diff options
author | Hussein Ait Lahcen <hussein.aitlahcen@gmail.com> | 2018-06-21 10:50:37 +0200 |
---|---|---|
committer | Hussein Ait Lahcen <hussein.aitlahcen@gmail.com> | 2018-06-21 11:07:02 +0200 |
commit | e13be120a535969d8975be993fb9e35c780094e2 (patch) | |
tree | 0065a2983eaad742f3499cbce538964c86185590 /nodegit | |
parent | 8be0d90992efd13b71166cd32d0fc6f10a6ed600 (diff) | |
download | clever-tools-nix-e13be120a535969d8975be993fb9e35c780094e2.tar.gz clever-tools-nix-e13be120a535969d8975be993fb9e35c780094e2.tar.zst clever-tools-nix-e13be120a535969d8975be993fb9e35c780094e2.zip |
refact: least fixed point
Diffstat (limited to 'nodegit')
-rw-r--r-- | nodegit/default.nix | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/nodegit/default.nix b/nodegit/default.nix index 83d734a..4bf6dd1 100644 --- a/nodegit/default.nix +++ b/nodegit/default.nix | |||
@@ -1,37 +1,35 @@ | |||
1 | { stdenv, fetchurl, curl, glibc, openssl }: | 1 | { stdenv, fetchurl, curl, glibc, openssl }: |
2 | 2 | ||
3 | let | 3 | assert stdenv.system == "x86_64-linux"; |
4 | |||
5 | stdenv.mkDerivation rec { | ||
6 | name = "nodegit-${version}-node-v51"; | ||
4 | version = "0.20.3"; | 7 | version = "0.20.3"; |
5 | 8 | ||
6 | curlWithGnutls = curl.override { | 9 | src = fetchurl { |
7 | sslSupport = false; | 10 | url = "https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v${version}-node-v51-linux-x64.tar.gz"; |
8 | gnutlsSupport = true; | 11 | sha256 = "d022a88e58fa70f78b59b475fa6ecc6724d372a779b132264cf571f71bc50020"; |
9 | }; | 12 | }; |
10 | 13 | ||
11 | libs = [ stdenv.cc.cc curlWithGnutls glibc openssl ]; | 14 | libPath = stdenv.lib.makeLibraryPath [ |
12 | in | 15 | stdenv.cc.cc |
13 | 16 | (curl.override { | |
14 | assert stdenv.system == "x86_64-linux"; | 17 | sslSupport = false; |
15 | 18 | gnutlsSupport = true; | |
16 | stdenv.mkDerivation { | 19 | }) |
17 | name = "nodegit-${version}-node-v51"; | 20 | glibc |
18 | 21 | openssl | |
19 | src = fetchurl { | 22 | ]; |
20 | url = "https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v${version}-node-v51-linux-x64.tar.gz"; | 23 | |
21 | sha256 = "d022a88e58fa70f78b59b475fa6ecc6724d372a779b132264cf571f71bc50020"; | 24 | installPhase = '' |
22 | }; | 25 | tar --extract --file=$src Release/nodegit.node --transform 's/Release\//linux-/' |
23 | 26 | lib=$out/lib/nodegit.node | |
24 | libPath = stdenv.lib.makeLibraryPath libs; | 27 | mkdir -p $out/lib |
25 | 28 | mv linux-nodegit.node $lib | |
26 | installPhase = '' | 29 | ''; |
27 | tar --extract --file=$src Release/nodegit.node --transform 's/Release\//linux-/' | 30 | |
28 | lib=$out/lib/nodegit.node | 31 | preFixup = '' |
29 | mkdir -p $out/lib | 32 | lib=$out/lib/nodegit.node |
30 | mv linux-nodegit.node $lib | 33 | patchelf --set-rpath "$libPath" "$lib" |
31 | ''; | 34 | ''; |
32 | 35 | } | |
33 | preFixup = '' | ||
34 | lib=$out/lib/nodegit.node | ||
35 | patchelf --set-rpath "$libPath" "$lib" | ||
36 | ''; | ||
37 | } | ||