2015-07-13 20:22:55 +01:00
|
|
|
{ stdenv, fetchurl, patchelf, zlib, libmad, libpng12, libcaca, mesa, alsaLib, libpulseaudio
|
|
|
|
, xlibs }:
|
2014-08-24 17:52:34 +01:00
|
|
|
|
2015-07-13 20:22:55 +01:00
|
|
|
assert stdenv.system == "x86_64-linux";
|
2014-07-15 16:21:18 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
inherit (xlibs) libXext libX11;
|
|
|
|
|
2015-01-15 04:25:26 +00:00
|
|
|
lpath = "${stdenv.cc.cc}/lib64:" + stdenv.lib.makeSearchPath "lib" [
|
2015-05-27 20:42:15 +01:00
|
|
|
zlib libmad libpng12 libcaca libXext libX11 mesa alsaLib libpulseaudio];
|
2014-07-15 16:21:18 +01:00
|
|
|
|
2014-08-18 15:24:45 +01:00
|
|
|
in
|
2014-07-15 16:21:18 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2015-07-13 20:22:55 +01:00
|
|
|
name = "adom-${version}-noteye";
|
|
|
|
version = "1.2.0_pre23";
|
2014-07-15 16:21:18 +01:00
|
|
|
|
2015-07-13 20:22:55 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ancardia.uk.to/download/adom_noteye_linux_ubuntu_64_${version}.tar.gz";
|
|
|
|
sha256 = "0sbn0csaqb9cqi0z5fdwvnymkf84g64csg0s9mm6fzh0sm2mi0hz";
|
2014-07-15 16:21:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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 \
|
2014-12-17 18:11:30 +00:00
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2014-07-15 16:21:18 +01:00
|
|
|
--set-rpath "$out/lib:${lpath}" \
|
|
|
|
$out/adom
|
|
|
|
|
|
|
|
mkdir $out/bin
|
|
|
|
cat >$out/bin/adom <<EOF
|
2014-08-18 15:24:45 +01:00
|
|
|
#! ${stdenv.shell}
|
2015-07-19 19:59:35 +01:00
|
|
|
(cd $out; exec $out/adom ; )
|
2014-07-15 16:21:18 +01:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/adom
|
|
|
|
'';
|
|
|
|
|
2014-08-18 15:24:45 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A rogue-like game with nice graphical interface";
|
2014-07-15 16:21:18 +01:00
|
|
|
homepage = http://adom.de/;
|
2014-08-18 15:24:45 +01:00
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
maintainers = [maintainers.smironov];
|
2014-07-15 16:21:18 +01:00
|
|
|
|
|
|
|
# Please, notify me (smironov) if you need the x86 version
|
|
|
|
platforms = ["x86_64-linux"];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|