Last active
February 6, 2018 06:28
-
-
Save markus1189/91daef51b0eb6c588f6d7b645da5e3bd to your computer and use it in GitHub Desktop.
DesktopDungeons on Nix(OS)
This file contains 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
# Nix build file for Desktop Dungeons | |
# nix-build --argstr savesDir ~/DDSaves DesktopDungeons.nix | |
{ pkgs ? import <nixpkgs> { system = "i686-linux";} | |
, savesDir | |
}: with pkgs; | |
assert lib.pathExists savesDir; | |
stdenv.mkDerivation rec { | |
name = "desktop-dungeons"; | |
version = "1.57"; | |
buildInputs = [ | |
mesa_glu | |
binutils | |
xorg.libX11 | |
xorg.libXcursor | |
stdenv.cc.cc | |
glib | |
gdk_pixbuf | |
gtk2 | |
alsaLib | |
libpulseaudio | |
]; | |
phases = [ "unpackPhase" "installPhase" ]; | |
ldPath = stdenv.lib.makeLibraryPath buildInputs; | |
src = ./Desktop_Dungeons_EE_Linux_1_57.tar.gz; | |
installPhase = '' | |
mkdir -p $out | |
patchelf --set-rpath "${ldPath}" DesktopDungeons_Data/Plugins/x86/ScreenSelector.so | |
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ | |
--set-rpath "$out/DesktopDungeons_Data/Plugins/x86:${ldPath}" \ | |
DesktopDungeons.x86 | |
rm Install.sh DesktopDungeons.sh | |
mv * $out/ | |
echo "Linking ${savesDir} to hold savegame files" | |
ln -s ${savesDir} $out/DesktopDungeons_Data/Saves | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment