diff options
Diffstat (limited to 'tools/sops-inventory/default.nix')
| -rw-r--r-- | tools/sops-inventory/default.nix | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/tools/sops-inventory/default.nix b/tools/sops-inventory/default.nix index d6a3d0c4..0f868629 100644 --- a/tools/sops-inventory/default.nix +++ b/tools/sops-inventory/default.nix | |||
| @@ -1,20 +1,24 @@ | |||
| 1 | { system, self, ... }: | 1 | { system, self, uv2nix, gitignore, ... }: |
| 2 | 2 | ||
| 3 | let | 3 | let |
| 4 | pkgs = self.legacyPackages.${system}; | 4 | pkgs = self.legacyPackages.${system}; |
| 5 | in | 5 | workspace = uv2nix.lib.workspace.loadWorkspace { |
| 6 | with pkgs.poetry2nix; | 6 | workspaceRoot = gitignore.lib.gitignoreSource ./.; |
| 7 | mkPoetryApplication { | 7 | }; |
| 8 | projectDir = cleanPythonSources { src = ./.; }; | 8 | pythonSet = self.lib.pythonSet { |
| 9 | 9 | inherit pkgs; | |
| 10 | nativeBuildInputs = with pkgs; [ makeWrapper ]; | 10 | python = pkgs.python3; |
| 11 | 11 | overlay = workspace.mkPyprojectOverlay { | |
| 12 | overrides = overrides.withDefaults (self: super: { | 12 | sourcePreference = "wheel"; |
| 13 | pyyaml = super.pyyaml.override { preferWheel = true; }; | 13 | }; |
| 14 | }); | 14 | }; |
| 15 | 15 | virtualEnv = pythonSet.mkVirtualEnv "sops-inventory" workspace.deps.default; | |
| 16 | in virtualEnv.overrideAttrs (oldAttrs: { | ||
| 17 | buildInputs = (oldAttrs.buildInputs or []) ++ [ pkgs.makeWrapper ]; | ||
| 16 | postInstall = '' | 18 | postInstall = '' |
| 19 | ${oldAttrs.postInstall or ""} | ||
| 20 | |||
| 17 | wrapProgram $out/bin/sops-inventory \ | 21 | wrapProgram $out/bin/sops-inventory \ |
| 18 | --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [git])} | 22 | --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [git])} |
| 19 | ''; | 23 | ''; |
| 20 | } | 24 | }) |
