diff options
author | Dan Peebles <pumpkin@me.com> | 2017-05-24 07:52:48 -0400 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2017-05-24 07:52:58 -0400 |
commit | c05461fde6968588e94c05c610f76518f93d31e4 (patch) | |
tree | 50c06f4d6f8c1c9f2cfa9ae8fe25d2a482cb489a /pkgs/development | |
parent | 45d3c49403e2f4bad61729072014eba52680d45b (diff) | |
download | nixlib-c05461fde6968588e94c05c610f76518f93d31e4.tar nixlib-c05461fde6968588e94c05c610f76518f93d31e4.tar.gz nixlib-c05461fde6968588e94c05c610f76518f93d31e4.tar.bz2 nixlib-c05461fde6968588e94c05c610f76518f93d31e4.tar.lz nixlib-c05461fde6968588e94c05c610f76518f93d31e4.tar.xz nixlib-c05461fde6968588e94c05c610f76518f93d31e4.tar.zst nixlib-c05461fde6968588e94c05c610f76518f93d31e4.zip |
pants13-pre: make it actually work on Linux
Third time's a charm. Not sure how I thought that three different files would download and have the same hash, but that's what the old code did. This one should have the three distinct platform hashes.
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/build-managers/pants/default.nix | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/development/tools/build-managers/pants/default.nix b/pkgs/development/tools/build-managers/pants/default.nix index 66d99c7fd938..f37c2502be6e 100644 --- a/pkgs/development/tools/build-managers/pants/default.nix +++ b/pkgs/development/tools/build-managers/pants/default.nix @@ -29,30 +29,30 @@ let # fetchurl because we don't know the URL ahead of time, even though it's deterministic. So we have # this downloader figure out the URL on the fly and then produce the deterministic result, so we # can still be a fixed-output derivation. - pants13-native-engine-prefix = { - "x86_64-darwin" = "mac/10.11"; - "x86_64-linux" = "linux/x86_64"; - "i686-linux" = "linux/i386"; + pants13-native-engine-info = { + "x86_64-darwin" = { prefix = "mac/10.11"; hash = "0n8z7rg0yfpxplvcw88lwv733zkhbzhc4w4zd4aznbcmfqdiz5br"; }; + "x86_64-linux" = { prefix = "linux/x86_64"; hash = "0cva97899q902m61xnfawhbjrh5h751716sn6ljli9b8fl7b5sz4"; }; + "i686-linux" = { prefix = "linux/i386"; hash = "1qckg0zsdq9x4jhn59pswbs11mxqxryl65qn42hrsvii2yxa9i5k"; }; }.${stdenv.system} or (throw "Unsupported system ${stdenv.system}!"); pants13-native-engine = runCommand "pants-native-${pants13-version}" { buildInputs = [ curl ]; outputHashMode = "recursive"; outputHashAlgo = "sha256"; - outputHash = "0n8z7rg0yfpxplvcw88lwv733zkhbzhc4w4zd4aznbcmfqdiz5br"; + outputHash = pants13-native-engine-info.hash; } '' native_version=$(curl -k -L https://raw.githubusercontent.com/pantsbuild/pants/release_${pants13-version}/src/python/pants/engine/subsystem/native_engine_version) - curl -kLO "https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/${pants13-native-engine-prefix}/$native_version/native_engine.so" + curl -kLO "https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/${pants13-native-engine-info.prefix}/$native_version/native_engine.so" # Ugh it tries to "download" from this prefix so let's just replicate their directory structure for now... - mkdir -p $out/bin/native-engine/${pants13-native-engine-prefix}/$native_version/ + mkdir -p $out/bin/native-engine/${pants13-native-engine-info.prefix}/$native_version/ # These should behave the same way in Nix land and we try not to differentiate between OS revisions... mkdir -p $out/bin/native-engine/mac/ ln -s 10.11 $out/bin/native-engine/mac/10.10 ln -s 10.11 $out/bin/native-engine/mac/10.12 - cp native_engine.so $out/bin/native-engine/${pants13-native-engine-prefix}/$native_version/ + cp native_engine.so $out/bin/native-engine/${pants13-native-engine-info.prefix}/$native_version/ ''; in { pants = |