diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix index e7558539515..f9ede48ffa1 100644 --- a/pkgs/applications/altcoins/default.nix +++ b/pkgs/applications/altcoins/default.nix @@ -67,4 +67,6 @@ rec { withGui = false; openssl = openssl_1_1_0; }; + + parity = callPackage ./parity { }; } diff --git a/pkgs/applications/altcoins/parity/default.nix b/pkgs/applications/altcoins/parity/default.nix new file mode 100644 index 00000000000..d7a5f7a0397 --- /dev/null +++ b/pkgs/applications/altcoins/parity/default.nix @@ -0,0 +1,7 @@ +let + version = "1.8.10"; + sha256 = "0slqfzyz11s6wjf77npgw4q6bcgkqmfm53daj47slxm6axkd954r"; + cargoSha256 = "0k0vqvmz2jr0lfzm8bfrshapgvxjr617shsg5m479m3r02p8l9l3"; + patches = [ ./patches/vendored-sources-1.8.patch ]; +in + import ./parity.nix { inherit version sha256 cargoSha256 patches; } diff --git a/pkgs/applications/altcoins/parity/parity.nix b/pkgs/applications/altcoins/parity/parity.nix new file mode 100644 index 00000000000..5c208aae147 --- /dev/null +++ b/pkgs/applications/altcoins/parity/parity.nix @@ -0,0 +1,37 @@ +{ version +, sha256 +, cargoSha256 +, patches +}: + +{ stdenv +, fetchFromGitHub +, rustPlatform +, pkgconfig +, openssl +, systemd +}: + +rustPlatform.buildRustPackage rec { + name = "parity-${version}"; + inherit cargoSha256 patches; + + src = fetchFromGitHub { + owner = "paritytech"; + repo = "parity"; + rev = "v${version}"; + inherit sha256; + }; + + buildInputs = [ pkgconfig systemd.lib systemd.dev openssl openssl.dev ]; + + # Some checks failed + doCheck = false; + + meta = with stdenv.lib; { + description = "Fast, light, robust Ethereum implementation"; + homepage = http://parity.io; + license = licenses.gpl3; + maintainers = [ maintainers.akru ]; + }; +} diff --git a/pkgs/applications/altcoins/parity/patches/vendored-sources-1.8.patch b/pkgs/applications/altcoins/parity/patches/vendored-sources-1.8.patch new file mode 100644 index 00000000000..3239df63de3 --- /dev/null +++ b/pkgs/applications/altcoins/parity/patches/vendored-sources-1.8.patch @@ -0,0 +1,100 @@ +diff --git a/.cargo/config b/.cargo/config +new file mode 100644 +index 000000000..8dddda426 +--- /dev/null ++++ b/.cargo/config +@@ -0,0 +1,94 @@ ++[source."https://github.com/alexcrichton/mio-named-pipes"] ++git = "https://github.com/alexcrichton/mio-named-pipes" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/nikvolf/parity-tokio-ipc"] ++git = "https://github.com/nikvolf/parity-tokio-ipc" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/nikvolf/tokio-named-pipes"] ++git = "https://github.com/nikvolf/tokio-named-pipes" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/bn"] ++git = "https://github.com/paritytech/bn" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/hidapi-rs"] ++git = "https://github.com/paritytech/hidapi-rs" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/hyper"] ++git = "https://github.com/paritytech/hyper" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/js-precompiled.git"] ++git = "https://github.com/paritytech/js-precompiled.git" ++branch = "stable" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/jsonrpc.git"] ++git = "https://github.com/paritytech/jsonrpc.git" ++branch = "parity-1.8" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/libusb-rs"] ++git = "https://github.com/paritytech/libusb-rs" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/libusb-sys"] ++git = "https://github.com/paritytech/libusb-sys" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/nanomsg.rs.git"] ++git = "https://github.com/paritytech/nanomsg.rs.git" ++branch = "parity-1.7" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/rust-ctrlc.git"] ++git = "https://github.com/paritytech/rust-ctrlc.git" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/rust-rocksdb"] ++git = "https://github.com/paritytech/rust-rocksdb" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/rust-secp256k1"] ++git = "https://github.com/paritytech/rust-secp256k1" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/rust-snappy"] ++git = "https://github.com/paritytech/rust-snappy" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/trezor-sys"] ++git = "https://github.com/paritytech/trezor-sys" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/paritytech/wasm-utils"] ++git = "https://github.com/paritytech/wasm-utils" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/tailhook/rotor"] ++git = "https://github.com/tailhook/rotor" ++branch = "master" ++replace-with = "vendored-sources" ++ ++[source."https://github.com/tomusdrw/ws-rs"] ++git = "https://github.com/tomusdrw/ws-rs" ++branch = "master" ++replace-with = "vendored-sources" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f4f07cbf0d..b8638131003 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14607,6 +14607,8 @@ with pkgs; dapp = self.altcoins.dapp; hevm = self.altcoins.hevm; + parity = self.altcoins.parity; + stellar-core = self.altcoins.stellar-core; aumix = callPackage ../applications/audio/aumix {