nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 42 lines 1.9 kB view raw
1{ lib, stdenv, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk 2, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg, requireFile }: 3 4stdenv.mkDerivation rec { 5 pname = "planetary-annihalation"; 6 version = "62857"; 7 8 src = requireFile { 9 message = "This file has to be downloaded manually via nix-prefetch-url."; 10 name = "PA_Linux_${version}.tar.bz2"; 11 sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k"; 12 }; 13 14 nativeBuildInputs = [ patchelf makeWrapper ]; 15 16 installPhase = '' 17 mkdir -p $out/{bin,lib} 18 19 cp -R * $out/ 20 mv $out/*.so $out/lib 21 ln -s $out/PA $out/bin/PA 22 23 ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0 24 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.lib 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 ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.cc.libc}/lib64" "$out/host/CoherentUI_Host" 27 28 wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib stdenv.cc.libc xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.libc}/lib64" 29 30 for f in $out/lib/*; do 31 patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib curl xorg.libX11 stdenv.cc.libc xorg.libXcursor "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.libc}/lib64" $f 32 done 33 ''; 34 35 meta = with lib; { 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 ]; 41 }; 42}