buildPython*: add updateScript to passthru
All Python packages now have an updateScript. The script calls `update-python-libraries` and passes it the position of the derivation expression obtained using `meta.position`. This works fine in case a Nix expression represents only a single derivation. If there are more in it, `update-python-libraries` will fail.
This commit is contained in:
committed by
Frederik Rietdijk
parent
82579f80a5
commit
74d0b82f29
@@ -0,0 +1,12 @@
|
||||
{ python3, runCommand, git }:
|
||||
|
||||
runCommand "update-python-libraries" {
|
||||
buildInputs = [
|
||||
(python3.withPackages(ps: with ps; [ packaging requests toolz ]))
|
||||
git
|
||||
];
|
||||
} ''
|
||||
cp ${./update-python-libraries.py} $out
|
||||
patchShebangs $out
|
||||
substituteInPlace $out --replace 'GIT = "git"' 'GIT = "${git}/bin/git"'
|
||||
''
|
||||
Reference in New Issue
Block a user