diff --git a/update.nix b/update.nix index 2b56008..b624fc4 100644 --- a/update.nix +++ b/update.nix @@ -1,8 +1,11 @@ -{ writers +{ lib +, writers , nix , nix-update }: -writers.writePython3Bin "pac-nix-update" -{ libraries = [ nix nix-update ]; flakeIgnore = [ "E" "W" ]; } - (builtins.readFile ./update.py) +let binpath = lib.makeBinPath [ nix nix-update ]; +in writers.writePython3Bin "pac-nix-update" +{ flakeIgnore = [ "E" "W" ]; } + (''import os; os.environ['PATH'] += os.pathsep + r"""${binpath}"""; del os'' + + builtins.readFile ./update.py)