use git revision as Nix derivation version

This commit is contained in:
Alexander Tomokhov 2023-11-22 09:44:50 +04:00
parent b3a6e6393c
commit fa766b7027
2 changed files with 3 additions and 2 deletions

View file

@ -1,8 +1,8 @@
{ pythonPackages }:
{ pythonPackages, rev ? "local" }:
pythonPackages.buildPythonApplication rec {
pname = "selfprivacy-graphql-api";
version = "local";
version = rev;
src = builtins.filterSource (p: t: p != ".git" && t != "symlink") ./.;
propagatedBuildInputs = with pythonPackages; [
fastapi

View file

@ -9,6 +9,7 @@
pkgs = nixpkgs.legacyPackages.${system};
selfprivacy-graphql-api = pkgs.callPackage ./default.nix {
pythonPackages = pkgs.python310Packages;
rev = self.shortRev or self.dirtyShortRev or "dirty";
};
in
{