2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, pkgs, fetchurl, makeWrapper, nodePackages }:
|
2018-05-05 02:16:19 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
uiEnv = pkgs.callPackage ./env.nix { };
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "parity-ui";
|
2018-09-06 23:15:47 +01:00
|
|
|
version = "0.3.4";
|
2018-05-05 02:16:19 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/parity-js/shell/releases/download/v${version}/parity-ui_${version}_amd64.deb";
|
2018-09-06 23:15:47 +01:00
|
|
|
sha256 = "1xbd00r9ph8w2d6d2c5xg4b5l74ljzs50rpc6kahfznypmh4kr73";
|
2019-08-15 13:41:18 +01:00
|
|
|
name = "${pname}-${version}.deb";
|
2018-05-05 02:16:19 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper nodePackages.asar ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/usr/
|
|
|
|
ar p $src data.tar.xz | tar -C $out -xJ .
|
|
|
|
substituteInPlace $out/usr/share/applications/parity-ui.desktop \
|
|
|
|
--replace "/opt/Parity UI" $out/bin
|
|
|
|
mv $out/usr/* $out/
|
|
|
|
mv "$out/opt/Parity UI" $out/share/parity-ui
|
|
|
|
rm -r $out/usr/
|
|
|
|
rm -r $out/opt/
|
|
|
|
|
|
|
|
fixupPhase
|
|
|
|
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
|
|
|
--set-rpath "${uiEnv.libPath}:$out/share/parity-ui" \
|
|
|
|
$out/share/parity-ui/parity-ui
|
|
|
|
|
|
|
|
find $out/share/parity-ui -name "*.node" -exec patchelf --set-rpath "${uiEnv.libPath}:$out/share/parity-ui" {} \;
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/share/parity-ui/parity-ui $out/bin/parity-ui
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "UI for Parity. Fast, light, robust Ethereum implementation";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://parity.io";
|
2018-05-05 02:16:19 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.sorpaas ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|