Guest User

Untitled

a guest
Feb 17th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. # Nix build file for Desktop Dungeons
  2. # nix-build --argstr savesDir ~/DDSaves DesktopDungeons.nix
  3. { pkgs ? import <nixpkgs> { system = "i686-linux";}
  4. , savesDir
  5. }: with pkgs;
  6.  
  7. assert lib.pathExists savesDir;
  8.  
  9. stdenv.mkDerivation rec {
  10. name = "desktop-dungeons";
  11. version = "1.57";
  12.  
  13. buildInputs = [
  14. mesa_glu
  15. binutils
  16. xorg.libX11
  17. xorg.libXcursor
  18. stdenv.cc.cc
  19. glib
  20. gdk_pixbuf
  21. gtk2
  22. alsaLib
  23. libpulseaudio
  24. ];
  25.  
  26. phases = [ "unpackPhase" "installPhase" ];
  27.  
  28. ldPath = stdenv.lib.makeLibraryPath buildInputs;
  29.  
  30. src = ./Desktop_Dungeons_EE_Linux_1_57.tar.gz;
  31.  
  32. installPhase = ''
  33. mkdir -p $out
  34.  
  35. patchelf --set-rpath "${ldPath}" DesktopDungeons_Data/Plugins/x86/ScreenSelector.so
  36. patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
  37. --set-rpath "$out/DesktopDungeons_Data/Plugins/x86:${ldPath}" \
  38. DesktopDungeons.x86
  39.  
  40. rm Install.sh DesktopDungeons.sh
  41.  
  42. mv * $out/
  43.  
  44. echo "Linking ${savesDir} to hold savegame files"
  45. ln -s ${savesDir} $out/DesktopDungeons_Data/Saves
  46. '';
  47. }
Add Comment
Please, Sign In to add comment