2014-08-18 18:24:45 +04:00
|
|
|
{ stdenv, patchelf, zlib, libmad, libpng12, libcaca, mesa, alsaLib, pulseaudio
|
|
|
|
, xlibs, plowshare }:
|
2014-07-15 19:21:18 +04:00
|
|
|
|
2014-08-24 20:52:34 +04:00
|
|
|
assert stdenv.isLinux;
|
|
|
|
|
2014-07-15 19:21:18 +04:00
|
|
|
let
|
|
|
|
|
|
|
|
inherit (xlibs) libXext libX11;
|
|
|
|
|
2015-01-15 07:25:26 +03:00
|
|
|
lpath = "${stdenv.cc.cc}/lib64:" + stdenv.lib.makeSearchPath "lib" [
|
2014-07-15 19:21:18 +04:00
|
|
|
zlib libmad libpng12 libcaca libXext libX11 mesa alsaLib pulseaudio];
|
|
|
|
|
2014-08-18 18:24:45 +04:00
|
|
|
in
|
2014-07-15 19:21:18 +04:00
|
|
|
assert stdenv.is64bit;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2014-08-18 18:24:45 +04:00
|
|
|
name = "adom-1.2.0-noteye";
|
2014-07-15 19:21:18 +04:00
|
|
|
|
2014-08-18 18:24:45 +04:00
|
|
|
# couldn't make fetchurl appear non-robot, even with --user-agent
|
2014-07-15 19:21:18 +04:00
|
|
|
src = stdenv.mkDerivation {
|
2014-08-18 18:24:45 +04:00
|
|
|
name = "adom-1.2.0-noteye.tar.gz";
|
2014-07-15 19:21:18 +04:00
|
|
|
buildCommand = ''
|
|
|
|
${plowshare}/bin/plowdown "http://www30.zippyshare.com/v/39200582/file.html"
|
|
|
|
F=`ls *tar.gz`
|
|
|
|
mv $F $out
|
|
|
|
'';
|
2014-08-18 18:24:45 +04:00
|
|
|
outputHashAlgo = "sha256";
|
|
|
|
outputHash = "1f825845d5007e676a4d1a3ccd887904b959bdddbcb9f241c42c2dac34037669";
|
2014-07-15 19:21:18 +04: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 21:11:30 +03:00
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2014-07-15 19:21:18 +04:00
|
|
|
--set-rpath "$out/lib:${lpath}" \
|
|
|
|
$out/adom
|
|
|
|
|
|
|
|
mkdir $out/bin
|
|
|
|
cat >$out/bin/adom <<EOF
|
2014-08-18 18:24:45 +04:00
|
|
|
#! ${stdenv.shell}
|
2014-07-15 19:21:18 +04:00
|
|
|
(cd $out; $out/adom ; )
|
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/adom
|
|
|
|
'';
|
|
|
|
|
2014-08-18 18:24:45 +04:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A rogue-like game with nice graphical interface";
|
2014-07-15 19:21:18 +04:00
|
|
|
homepage = http://adom.de/;
|
2014-08-18 18:24:45 +04:00
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
maintainers = [maintainers.smironov];
|
2014-07-15 19:21:18 +04:00
|
|
|
|
|
|
|
# Please, notify me (smironov) if you need the x86 version
|
|
|
|
platforms = ["x86_64-linux"];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|