summary refs log tree commit diff
path: root/pkgs/games/adom
diff options
context:
space:
mode:
authorSergey Mironov <grrwlf@gmail.com>2014-07-15 19:21:18 +0400
committerSergey Mironov <grrwlf@gmail.com>2014-07-16 17:51:39 +0400
commitc1fbd9dc6748676361ec0b81cfba603e6a6df9b2 (patch)
treecca6d43f752f0ae17b84eef7ffc7e1b20a21af3e /pkgs/games/adom
parentce911624713638ef7b2946b5b3bb5533672e2506 (diff)
downloadnixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.tar
nixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.tar.gz
nixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.tar.bz2
nixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.tar.lz
nixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.tar.xz
nixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.tar.zst
nixpkgs-c1fbd9dc6748676361ec0b81cfba603e6a6df9b2.zip
adom: add famous rogue-like game
Diffstat (limited to 'pkgs/games/adom')
-rw-r--r--pkgs/games/adom/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/games/adom/default.nix b/pkgs/games/adom/default.nix
new file mode 100644
index 00000000000..9041fc225b0
--- /dev/null
+++ b/pkgs/games/adom/default.nix
@@ -0,0 +1,71 @@
+{stdenv, patchelf, zlib, libmad, libpng12, libcaca, mesa, alsaLib, pulseaudio,
+xlibs, plowshare}:
+
+let
+
+  inherit (xlibs) libXext libX11;
+
+  lpath = "${stdenv.gcc.gcc}/lib64:" + stdenv.lib.makeSearchPath "lib" [
+      zlib libmad libpng12 libcaca libXext libX11 mesa alsaLib pulseaudio];
+
+in 
+assert stdenv.is64bit;
+stdenv.mkDerivation rec {
+
+  name = "adom-1.20-noteye";
+
+  src = stdenv.mkDerivation {
+    name = "adom-1.20-noteye.tar.gz";
+    buildCommand = ''
+      ${plowshare}/bin/plowdown "http://www30.zippyshare.com/v/39200582/file.html"
+      ls -lh
+      F=`ls *tar.gz`
+      echo "Checking $F"
+      sha256sum -c <<EOF
+      1f825845d5007e676a4d1a3ccd887904b959bdddbcb9f241c42c2dac34037669 $F
+      EOF
+      echo "Moving $F into $out..."
+      mv $F $out
+    '';
+  };
+
+  buildCommand = ''
+    . $stdenv/setup
+
+    unpackPhase
+
+    mkdir -pv $out
+    cp -r -t $out adom/*
+
+    chmod u+w $out/lib
+    for l in $out/lib/*so* ; do
+      chmod u+w $l
+      ${patchelf}/bin/patchelf \
+        --set-rpath "$out/lib:${lpath}" \
+        $l
+    done
+
+    ${patchelf}/bin/patchelf \
+      --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-rpath "$out/lib:${lpath}" \
+      $out/adom
+
+    mkdir $out/bin
+    cat >$out/bin/adom <<EOF
+    (cd $out; $out/adom ; )
+    EOF
+    chmod +x $out/bin/adom
+  '';
+
+  meta = {
+    description = "Adom (Ancient Domains Of Mystery) is a rogue-like game with nice graphical interface";
+    homepage = http://adom.de/;
+    license = "unfree-redistributable";
+    maintainers = [stdenv.lib.maintainers.smironov];
+
+    # Please, notify me (smironov) if you need the x86 version
+    platforms = ["x86_64-linux"];
+  };
+}
+
+