1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/altcoins/parity-ui/default.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv, pkgs, fetchurl, makeWrapper, nodePackages }:
2018-05-05 02:16:19 +01:00
let
uiEnv = pkgs.callPackage ./env.nix { };
in stdenv.mkDerivation rec {
name = "parity-ui-${version}";
version = "0.2.8";
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";
sha256 = "1nyarq73jdknhax68cq2i868sznghzj70kvk4ixypxnjb1q6a53a";
2018-05-05 02:16:19 +01:00
name = "${name}.deb";
};
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" {} \;
paxmark m $out/share/parity-ui/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";
homepage = http://parity.io;
license = licenses.gpl3;
maintainers = [ maintainers.sorpaas ];
platforms = platforms.linux;
};
}