diff options
-rw-r--r-- | pkgs/zcash/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/zcash/default.nix b/pkgs/zcash/default.nix new file mode 100644 index 0000000..07528ad --- /dev/null +++ b/pkgs/zcash/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, patchelf, gcc5 }: + +stdenv.mkDerivation rec { + version = "1.0.9"; + name = "zcash-${version}"; + + src = fetchurl { + url = "https://z.cash/downloads/zcash-1.0.9-linux64.tar.gz"; + sha256 = "74573fac7888ebe08056501da6934c1339b25957a872bbbaabfc074a472c66e1"; + }; + + buildInputs = [ gcc5 ]; + + buildPhase = '' + set -x + for b in bin/{zcash-cli,zcashd,zcash-tx}; do + echo "patching $b" + patchelf \ + --set-rpath "${stdenv.lib.makeLibraryPath [ gcc5.cc ]}" \ + --set-interpreter "$(cat ${stdenv.cc}/nix-support/dynamic-linker)" \ + "$b" + done + set +x + ''; + + installPhase = '' + mkdir $out + cp -r * $out/ + ''; +} |