diff options
Diffstat (limited to 'pkgs/applications/blockchains/jormungandr/default.nix')
-rw-r--r-- | pkgs/applications/blockchains/jormungandr/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/applications/blockchains/jormungandr/default.nix b/pkgs/applications/blockchains/jormungandr/default.nix new file mode 100644 index 00000000000..8c276d6bb80 --- /dev/null +++ b/pkgs/applications/blockchains/jormungandr/default.nix @@ -0,0 +1,55 @@ +{ stdenv +, lib +, fetchgit +, rustPlatform +, openssl +, pkgconfig +, protobuf +, darwin +}: + +rustPlatform.buildRustPackage rec { + pname = "jormungandr"; + version = "0.3.3"; + + src = fetchgit { + url = "https://github.com/input-output-hk/${pname}"; + rev = "v${version}"; + sha256 = "1fw3cl2rxnw9mww1b1z96x2iapwbpdgyp4ra19dhvfzmlvaiml5j"; + fetchSubmodules = true; + }; + + cargoSha256 = "1ilp9ffaz3njv38mnqics4b5d7wh52mj4rwi71h5c0wzx4ww3zal"; + + nativeBuildInputs = [ pkgconfig protobuf ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + + patchPhase = '' + sed -i "s~SCRIPTPATH=.*~SCRIPTPATH=$out/templates/~g" scripts/bootstrap + ''; + + installPhase = '' + install -d $out/bin $out/templates + install -m755 target/*/release/jormungandr $out/bin/ + install -m755 target/*/release/jcli $out/bin/ + install -m755 scripts/send-transaction $out/templates + install -m755 scripts/jcli-helpers $out/bin/ + install -m755 scripts/bootstrap $out/bin/jormungandr-bootstrap + install -m644 scripts/faucet-send-money.shtempl $out/templates/ + install -m644 scripts/create-account-and-delegate.shtempl $out/templates/ + install -m644 scripts/faucet-send-certificate.shtempl $out/templates/ + ''; + + PROTOC = "${protobuf}/bin/protoc"; + + # Disabling integration tests + doCheck = false; + + meta = with stdenv.lib; { + description = "An aspiring blockchain node"; + homepage = "https://input-output-hk.github.io/jormungandr/"; + license = licenses.mit; + maintainers = [ maintainers.mmahut ]; + platforms = platforms.all; + }; +} |