1 { lib, stdenv, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk
2 , nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg, requireFile }:
4 stdenv.mkDerivation rec {
5 pname = "planetary-annihalation";
9 message = "This file has to be downloaded manually via nix-prefetch-url.";
10 name = "PA_Linux_${version}.tar.bz2";
11 sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k";
14 nativeBuildInputs = [ patchelf makeWrapper ];
17 mkdir -p $out/{bin,lib}
21 ln -s $out/PA $out/bin/PA
23 ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
25 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA"
26 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc xorg.libXdamage xorg.libXfixes gtk2 glib stdenv.cc.libc "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsa-lib atk nspr fontconfig cairo pango nss freetype gnome2.GConf gdk-pixbuf xorg.libXrender ]}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64" "$out/host/CoherentUI_Host"
28 wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64"
30 for f in $out/lib/*; do
31 patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc curl xorg.libX11 stdenv.cc.libc xorg.libXcursor "$out" ]}:${lib.getLib stdenv.cc.cc}/lib64:${stdenv.cc.libc}/lib64" $f
36 homepage = "http://www.uberent.com/pa/";
37 description = "Next-generation RTS that takes the genre to a planetary scale";
38 license = lib.licenses.unfree;
39 platforms = platforms.linux;
40 maintainers = [ maintainers.domenkozar ];