]>
Commit | Line | Data |
---|---|---|
8be0d909 | 1 | { stdenv, fetchurl, glibc, nodegit }: |
96ea4f91 | 2 | |
e13be120 HAL |
3 | stdenv.mkDerivation rec { |
4 | name = "clever-tools-${version}"; | |
96ea4f91 HAL |
5 | version = "0.9.3"; |
6 | ||
e13be120 HAL |
7 | src = fetchurl { |
8 | url = "https://clever-tools.cellar.services.clever-cloud.com/releases/${version}/clever-tools-${version}_linux.tar.gz"; | |
9 | sha256 = "adcae5af912dcbdc74d996b6e94767f24d16bf1bdcd5073797f999fe75b018a4"; | |
10 | }; | |
96ea4f91 | 11 | |
e13be120 | 12 | buildInputs = [ nodegit ]; |
96ea4f91 | 13 | |
e13be120 | 14 | libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc glibc ]; |
96ea4f91 | 15 | |
e13be120 | 16 | nodegitLibrary = stdenv.lib.makeLibraryPath [ nodegit ]; |
96ea4f91 | 17 | |
e13be120 HAL |
18 | installPhase = '' |
19 | tar --extract --file=$src linux/clever --transform 's/linux\///' | |
20 | bin=$out/bin/clever | |
21 | mkdir -p $out/bin | |
22 | mv clever $bin | |
23 | ln -s "$nodegitLibrary/nodegit.node" "$out/bin/nodegit.node" | |
24 | ''; | |
96ea4f91 | 25 | |
e13be120 | 26 | dontStrip = "true"; |
96ea4f91 | 27 | |
e13be120 HAL |
28 | preFixup = '' |
29 | bin=$out/bin/clever | |
30 | patchelf \ | |
31 | --set-rpath "$libPath" \ | |
32 | --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | |
33 | "$bin" | |
34 | ''; | |
96ea4f91 | 35 | |
e13be120 | 36 | } |