aboutsummaryrefslogtreecommitdiffhomepage
path: root/nodegit
diff options
context:
space:
mode:
Diffstat (limited to 'nodegit')
-rw-r--r--nodegit/default.nix60
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
3let 3assert stdenv.system == "x86_64-linux";
4
5stdenv.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 [
12in 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 }