fetchcargo: Fix cargo-vendor-normalise for darwin

This commit is contained in:
Silvan Mosberger 2018-09-17 20:21:21 +02:00
parent a3e1da17cb
commit 50578abfc5
No known key found for this signature in database
GPG Key ID: 9424360B4B85C9E7

View File

@ -2,8 +2,11 @@
let cargo-vendor-normalise = stdenv.mkDerivation {
name = "cargo-vendor-normalise";
src = ./cargo-vendor-normalise.py;
nativeBuildInputs = [ python3.pkgs.wrapPython ];
unpackPhase = ":";
installPhase = "install -D $src $out/bin/cargo-vendor-normalise";
pythonPath = [ python3.pkgs.toml ];
postFixup = "wrapPythonPrograms";
doInstallCheck = true;
installCheckPhase = ''
# check that ./fetchcargo-default-config.toml is a fix point
@ -11,7 +14,6 @@ let cargo-vendor-normalise = stdenv.mkDerivation {
< $reference $out/bin/cargo-vendor-normalise > test;
cmp test $reference
'';
buildInputs = [ (python3.withPackages(ps: [ ps.toml ])) ];
preferLocalBuild = true;
};
in