Created
August 26, 2017 13:37
-
-
Save anonymous/51ccb711657e46af332002b8b0eb4300 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} | |
, cairo ? pkgs.cairo | |
, fetchurl ? pkgs.fetchurl | |
, glib ? pkgs.glib | |
, patchelf ? pkgs.patchelf | |
, stdenv ? pkgs.stdenv | |
, xorg ? pkgs.xorg | |
, nss | |
, nspr | |
, gnome3 | |
, gnome2 | |
, fontconfig | |
, freetype | |
, pango | |
, libXi | |
, libXcursor | |
, libXext | |
, libXfixes | |
, libXrender | |
, libXcomposite | |
, libXdamage | |
, libXtst | |
, libXrandr | |
, alsaLib | |
, expat | |
, dbus | |
, gdk_pixbuf | |
, libnotify | |
, gcc | |
}: | |
stdenv.mkDerivation rec { | |
name = "GoPanda"; | |
version = "2"; | |
meta = { | |
homepage = "http://pandanet-igs.com/communities/gopanda2"; | |
}; | |
src = fetchurl { | |
url = "http://pandanet-igs.com/gopanda2/installer/stable/linux-64/gopanda2-linux-64.tar.gz"; | |
sha256 = "6d0a13e81a4646779331ff182acdbf9fe7982b2659f12a794a50897ea7368e1c"; | |
}; | |
phases = [ "unpackPhase" "installPhase" ]; | |
buildInputs = [ | |
cairo | |
glib | |
xorg.libX11 | |
nss | |
nspr | |
gnome3.gconf | |
gnome2.gtk | |
fontconfig | |
freetype | |
pango | |
libXi | |
libXcursor | |
libXext | |
libXfixes | |
libXrender | |
libXcomposite | |
libXdamage | |
libXtst | |
libXrandr | |
alsaLib | |
expat | |
dbus | |
gdk_pixbuf | |
libnotify | |
gcc.cc.lib | |
]; | |
libPath = stdenv.lib.makeLibraryPath buildInputs; | |
installPhase = '' | |
mkdir -p $out/share | |
mkdir -p $out/bin | |
cp -r locales $out/share | |
cp GoPanda2 $out/bin/GoPanda2 | |
patchelf \ | |
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | |
--set-rpath ${libPath} \ | |
$out/bin/GoPanda2 | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment