Files
nixpkgs/pkgs/by-name/up/update-python-libraries/package.nix
T
2025-04-17 16:25:54 +02:00

31 lines
746 B
Nix

{
lib,
python3,
runCommand,
git,
nix,
nix-prefetch-git,
}:
runCommand "update-python-libraries"
{
buildInputs = [
(python3.withPackages (
ps: with ps; [
packaging
requests
toolz
]
))
];
}
''
cp ${./update-python-libraries.py} $out
patchShebangs $out
substituteInPlace $out \
--replace-fail 'NIX = "nix"' 'NIX = "${lib.getExe nix}"' \
--replace-fail 'NIX_PREFETCH_URL = "nix-prefetch-url"' 'NIX_PREFETCH_URL = "${lib.getExe' nix "nix-prefetch-url"}"' \
--replace-fail 'NIX_PREFETCH_GIT = "nix-prefetch-git"' 'NIX_PREFETCH_GIT = "${lib.getExe nix-prefetch-git}"' \
--replace-fail 'GIT = "git"' 'GIT = "${lib.getExe git}"'
''