1{
2 lib,
3 python3,
4 runCommand,
5 git,
6 nix,
7 nix-prefetch-git,
8}:
9
10runCommand "update-python-libraries"
11 {
12 buildInputs = [
13 (python3.withPackages (
14 ps: with ps; [
15 packaging
16 requests
17 toolz
18 ]
19 ))
20 ];
21 }
22 ''
23 cp ${./update-python-libraries.py} $out
24 patchShebangs $out
25 substituteInPlace $out \
26 --replace-fail 'NIX = "nix"' 'NIX = "${lib.getExe nix}"' \
27 --replace-fail 'NIX_PREFETCH_URL = "nix-prefetch-url"' 'NIX_PREFETCH_URL = "${lib.getExe' nix "nix-prefetch-url"}"' \
28 --replace-fail 'NIX_PREFETCH_GIT = "nix-prefetch-git"' 'NIX_PREFETCH_GIT = "${lib.getExe nix-prefetch-git}"' \
29 --replace-fail 'GIT = "git"' 'GIT = "${lib.getExe git}"'
30 ''