Skip to content

Commit

Permalink
nix: handle dynamic version
Browse files Browse the repository at this point in the history
  • Loading branch information
lucc committed Aug 13, 2024
1 parent faa0fc3 commit 7a9ca79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
dependencies' = pkgs.lib.lists.concatMap (builtins.match "([^>=<]*).*") pyproject.project.dependencies;
# the package is called gpg on PyPI but gpgme in nixpkgs
dependencies = map (x: if x == "gpg" then "gpgme" else x) dependencies';
version = "0.11.dev+${if self ? shortRev then self.shortRev else "dirty"}";
in
{
packages = {
alot = pkgs.python3Packages.buildPythonApplication {
name = "alot";
version = pyproject.project.version + "-post";
inherit version;
SETUPTOOLS_SCM_PRETEND_VERSION = version;
src = self;
pyproject = true;
outputs = [
Expand Down

0 comments on commit 7a9ca79

Please sign in to comment.