|
29 | 29 | # fetchurl because we don't know the URL ahead of time, even though it's deterministic. So we have
|
30 | 30 | # this downloader figure out the URL on the fly and then produce the deterministic result, so we
|
31 | 31 | # can still be a fixed-output derivation.
|
32 |
| - pants13-native-engine-prefix = { |
33 |
| - "x86_64-darwin" = "mac/10.11"; |
34 |
| - "x86_64-linux" = "linux/x86_64"; |
35 |
| - "i686-linux" = "linux/i386"; |
| 32 | + pants13-native-engine-info = { |
| 33 | + "x86_64-darwin" = { prefix = "mac/10.11"; hash = "0n8z7rg0yfpxplvcw88lwv733zkhbzhc4w4zd4aznbcmfqdiz5br"; }; |
| 34 | + "x86_64-linux" = { prefix = "linux/x86_64"; hash = "0cva97899q902m61xnfawhbjrh5h751716sn6ljli9b8fl7b5sz4"; }; |
| 35 | + "i686-linux" = { prefix = "linux/i386"; hash = "1qckg0zsdq9x4jhn59pswbs11mxqxryl65qn42hrsvii2yxa9i5k"; }; |
36 | 36 | }.${stdenv.system} or (throw "Unsupported system ${stdenv.system}!");
|
37 | 37 |
|
38 | 38 | pants13-native-engine = runCommand "pants-native-${pants13-version}" {
|
39 | 39 | buildInputs = [ curl ];
|
40 | 40 | outputHashMode = "recursive";
|
41 | 41 | outputHashAlgo = "sha256";
|
42 |
| - outputHash = "0n8z7rg0yfpxplvcw88lwv733zkhbzhc4w4zd4aznbcmfqdiz5br"; |
| 42 | + outputHash = pants13-native-engine-info.hash; |
43 | 43 | } ''
|
44 | 44 | native_version=$(curl -k -L https://raw.githubusercontent.com/pantsbuild/pants/release_${pants13-version}/src/python/pants/engine/subsystem/native_engine_version)
|
45 |
| - curl -kLO "https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/${pants13-native-engine-prefix}/$native_version/native_engine.so" |
| 45 | + curl -kLO "https://dl.bintray.com/pantsbuild/bin/build-support/bin/native-engine/${pants13-native-engine-info.prefix}/$native_version/native_engine.so" |
46 | 46 |
|
47 | 47 | # Ugh it tries to "download" from this prefix so let's just replicate their directory structure for now...
|
48 |
| - mkdir -p $out/bin/native-engine/${pants13-native-engine-prefix}/$native_version/ |
| 48 | + mkdir -p $out/bin/native-engine/${pants13-native-engine-info.prefix}/$native_version/ |
49 | 49 |
|
50 | 50 | # These should behave the same way in Nix land and we try not to differentiate between OS revisions...
|
51 | 51 | mkdir -p $out/bin/native-engine/mac/
|
52 | 52 | ln -s 10.11 $out/bin/native-engine/mac/10.10
|
53 | 53 | ln -s 10.11 $out/bin/native-engine/mac/10.12
|
54 | 54 |
|
55 |
| - cp native_engine.so $out/bin/native-engine/${pants13-native-engine-prefix}/$native_version/ |
| 55 | + cp native_engine.so $out/bin/native-engine/${pants13-native-engine-info.prefix}/$native_version/ |
56 | 56 | '';
|
57 | 57 | in {
|
58 | 58 | pants =
|
|
0 commit comments