From 19d093c29f0b6b64f4c0f383ec34a85f76e04537 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Apr 2026 11:49:12 +0200 Subject: bump --- tools/sops-inventory/default.nix | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'tools/sops-inventory/default.nix') 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 @@ -{ system, self, ... }: +{ system, self, uv2nix, gitignore, ... }: let pkgs = self.legacyPackages.${system}; -in -with pkgs.poetry2nix; -mkPoetryApplication { - projectDir = cleanPythonSources { src = ./.; }; - - nativeBuildInputs = with pkgs; [ makeWrapper ]; - - overrides = overrides.withDefaults (self: super: { - pyyaml = super.pyyaml.override { preferWheel = true; }; - }); - + workspace = uv2nix.lib.workspace.loadWorkspace { + workspaceRoot = gitignore.lib.gitignoreSource ./.; + }; + pythonSet = self.lib.pythonSet { + inherit pkgs; + python = pkgs.python3; + overlay = workspace.mkPyprojectOverlay { + sourcePreference = "wheel"; + }; + }; + virtualEnv = pythonSet.mkVirtualEnv "sops-inventory" workspace.deps.default; +in virtualEnv.overrideAttrs (oldAttrs: { + buildInputs = (oldAttrs.buildInputs or []) ++ [ pkgs.makeWrapper ]; postInstall = '' + ${oldAttrs.postInstall or ""} + wrapProgram $out/bin/sops-inventory \ --prefix PATH : ${pkgs.lib.makeBinPath (with pkgs; [git])} ''; -} +}) -- cgit v1.2.3