diff --git a/flake.nix b/flake.nix index f5b36db..d8739ac 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,12 @@ }; outputs = - inputs@{ self, flake-parts, pyproject-nix, ... }: + inputs@{ + self, + flake-parts, + pyproject-nix, + ... + }: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" @@ -21,20 +26,25 @@ ]; perSystem = - { config, pkgs, lib, ... }: + { + config, + pkgs, + lib, + ... + }: let project = pyproject-nix.lib.project.loadPyproject { pyproject = lib.pipe ./pyproject.toml [ lib.readFile - (lib.replaceStrings ["cryptg-anyos"] ["cryptg"]) + (lib.replaceStrings [ "cryptg-anyos" ] [ "cryptg" ]) builtins.fromTOML ]; }; python = pkgs.python3.override { packageOverrides = import ./nix/mkPackageOverrides.nix { inherit pkgs; }; }; - packageAttrs = import ./nix/mkPackageAttrs.nix { - inherit pkgs project python; + packageAttrs = import ./nix/mkPackageAttrs.nix { + inherit pkgs project python; rev = self.rev or null; }; in diff --git a/nix/mkPackageOverrides.nix b/nix/mkPackageOverrides.nix index d8f8c23..c4e1327 100644 --- a/nix/mkPackageOverrides.nix +++ b/nix/mkPackageOverrides.nix @@ -9,10 +9,12 @@ self: super: { }; doCheck = false; }); - mkdocs-git-revision-date-localized-plugin = super.mkdocs-git-revision-date-localized-plugin.overridePythonAttrs (old: { - pyproject = true; - format = null; + mkdocs-git-revision-date-localized-plugin = + super.mkdocs-git-revision-date-localized-plugin.overridePythonAttrs + (old: { + pyproject = true; + format = null; - dependencies = old.propagatedBuildInputs ++ [ super.setuptools-scm ]; - }); + dependencies = old.propagatedBuildInputs ++ [ super.setuptools-scm ]; + }); }