forked from mirrors/nixpkgs
unnethack: add new package
This commit is contained in:
parent
6e049800ed
commit
97a289b111
53
pkgs/games/unnethack/default.nix
Normal file
53
pkgs/games/unnethack/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ stdenv, fetchgit, utillinux, ncurses, flex, bison }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "unnethack-5.3.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://github.com/UnNetHack/UnNetHack";
|
||||
rev = "63677eb256b5a75430f190cfb0f76bdd9bd0b9dd";
|
||||
sha256 = "48a80ef83308b91d4aa86598e30e5b5ce9a5b2da2a763fe921698990c3243969";
|
||||
};
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
nativeBuildInputs = [ utillinux flex bison ];
|
||||
|
||||
configureFlags = [ "--enable-curses-graphics"
|
||||
"--disable-tty-graphics"
|
||||
"--with-owner=no"
|
||||
"--with-group=no"
|
||||
"--with-gamesdir=/tmp/unnethack"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -r /tmp/unnethack $out/share/unnethack/profile
|
||||
mv $out/bin/unnethack $out/bin/.wrapped_unnethack
|
||||
cat <<EOF >$out/bin/unnethack
|
||||
#! ${stdenv.shell} -e
|
||||
if [ ! -d ~/.unnethack ]; then
|
||||
mkdir -p ~/.unnethack
|
||||
cp -r $out/share/unnethack/profile/* ~/.unnethack
|
||||
chmod -R +w ~/.unnethack
|
||||
fi
|
||||
|
||||
ln -s ~/.unnethack /tmp/unnethack
|
||||
|
||||
cleanup() {
|
||||
rm -rf /tmp/unnethack
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
$out/bin/.wrapped_unnethack
|
||||
EOF
|
||||
chmod +x $out/bin/unnethack
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fork of NetHack";
|
||||
homepage = "http://unnethack.wordpress.com/";
|
||||
license = "nethack";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
|
@ -8268,6 +8268,8 @@ let
|
|||
gnutls = gnutls;
|
||||
});
|
||||
|
||||
unnethack = callPackage ../games/unnethack { };
|
||||
|
||||
v8_3_16_14 = callPackage ../development/libraries/v8/3.16.14.nix {
|
||||
inherit (pythonPackages) gyp;
|
||||
stdenv = overrideCC stdenv gcc48;
|
||||
|
|
Loading…
Reference in a new issue