parity-ui: init at 0.1.1

This commit is contained in:
Wei Tang 2018-05-05 09:16:19 +08:00
parent b1e20c9d4e
commit 3bd1fcc4ad
4 changed files with 71 additions and 0 deletions

View file

@ -86,4 +86,5 @@ rec {
parity = callPackage ./parity { };
parity-beta = callPackage ./parity/beta.nix { };
parity-ui = callPackage ./parity-ui { };
}

View file

@ -0,0 +1,50 @@
{ stdenv, pkgs, fetchurl, lib, makeWrapper, nodePackages }:
let
uiEnv = pkgs.callPackage ./env.nix { };
in stdenv.mkDerivation rec {
name = "parity-ui-${version}";
version = "0.1.1";
src = fetchurl {
url = "https://github.com/parity-js/shell/releases/download/v${version}/parity-ui_${version}_amd64.deb";
sha256 = "1jym6q63m5f4xm06dxiiabhbqnr0hysf2d3swysncs5hg6w00lh3";
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;
};
}

View file

@ -0,0 +1,19 @@
{ stdenv, lib, zlib, glib, alsaLib, dbus, gtk2, atk, pango, freetype, fontconfig
, libgnome-keyring3, gdk_pixbuf, gvfs, cairo, cups, expat, libgpgerror, nspr
, nss, xorg, libcap, systemd, libnotify, libsecret, gnome3 }:
let
packages = [
stdenv.cc.cc zlib glib dbus gtk2 atk pango freetype libgnome-keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr nss
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr
xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify
xorg.libxcb libsecret gnome3.gconf
];
libPathNative = lib.makeLibraryPath packages;
libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages;
libPath = "${libPathNative}:${libPath64}";
in { inherit packages libPath; }

View file

@ -14883,6 +14883,7 @@ with pkgs;
parity = self.altcoins.parity;
parity-beta = self.altcoins.parity-beta;
parity-ui = self.altcoins.parity-ui;
stellar-core = self.altcoins.stellar-core;