2021-01-15 04:31:39 +00:00
|
|
|
{ lib, stdenv, fetchurl, ncurses, openssl, flex, bison, less, miscfiles }:
|
2009-10-26 23:03:36 +00:00
|
|
|
|
2021-06-22 21:44:58 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bsd-games";
|
|
|
|
version = "2.17";
|
2009-10-26 23:03:36 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-13 20:26:20 +00:00
|
|
|
url = "mirror://ibiblioPubLinux/games/${pname}-${version}.tar.gz";
|
|
|
|
hash = "sha256-Bm+SSu9sHF6pRvWI428wMCH138CTlEc48CXY7bxv/2A=";
|
2009-10-26 23:03:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ncurses openssl flex bison ];
|
|
|
|
|
2010-11-10 17:18:51 +00:00
|
|
|
patches = [
|
2022-03-13 20:26:20 +00:00
|
|
|
# Remove UTMPX support on Makefrag file
|
2010-11-10 17:18:51 +00:00
|
|
|
(fetchurl {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/dm-noutmpx.patch";
|
2010-11-10 17:18:51 +00:00
|
|
|
sha256 = "1k3qp3jj0dksjr4dnppv6dvkwslrgk9c7p2n9vipqildpxgqp7w2";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-08 22:52:35 +00:00
|
|
|
|
2017-08-03 19:50:50 +00:00
|
|
|
makeFlags = [ "STRIP=" ];
|
|
|
|
|
2009-10-26 23:03:36 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cat > config.params << EOF
|
|
|
|
bsd_games_cfg_man6dir=$out/share/man/man6
|
|
|
|
bsd_games_cfg_man8dir=$out/share/man/man8
|
|
|
|
bsd_games_cfg_man5dir=$out/share/man/man5
|
|
|
|
bsd_games_cfg_wtf_acronymfile=$out/share/misc/acronyms
|
|
|
|
bsd_games_cfg_fortune_dir=$out/share/games/fortune
|
|
|
|
bsd_games_cfg_quiz_dir=$out/share/games/quiz
|
|
|
|
bsd_games_cfg_gamesdir=$out/bin
|
2013-01-09 05:53:44 +00:00
|
|
|
bsd_games_cfg_sbindir=$out/bin
|
|
|
|
bsd_games_cfg_usrbindir=$out/bin
|
|
|
|
bsd_games_cfg_libexecdir=$out/lib/games/dm
|
|
|
|
bsd_games_cfg_docdir=$out/share/doc/bsd-games
|
|
|
|
bsd_games_cfg_sharedir=$out/share/games
|
|
|
|
bsd_games_cfg_varlibdir=.
|
2009-10-26 23:03:36 +00:00
|
|
|
bsd_games_cfg_non_interactive=y
|
|
|
|
bsd_games_cfg_no_build_dirs="dab hack phantasia sail"
|
2014-09-03 21:57:34 +00:00
|
|
|
bsd_games_cfg_dictionary_src=${miscfiles}/share/web2
|
2013-01-09 05:53:44 +00:00
|
|
|
bsd_games_cfg_pager=${less}
|
2009-10-26 23:03:36 +00:00
|
|
|
EOF
|
2010-02-21 08:11:17 +00:00
|
|
|
|
2013-01-09 05:53:44 +00:00
|
|
|
sed -e s/getline/bsdgames_local_getline/g -i $(grep getline -rl .)
|
2009-10-26 23:03:36 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
sed -i -e 's,/usr,'$out, \
|
|
|
|
-e "s,-o root -g root, ," \
|
|
|
|
-e "s,-o root -g games, ," \
|
|
|
|
-e "s,.*chown.*,true," \
|
|
|
|
-e 's/INSTALL_VARDATA.*/INSTALL_VARDATA := true/' \
|
|
|
|
-e 's/INSTALL_HACKDIR.*/INSTALL_HACKDIR := true/' \
|
|
|
|
-e 's/INSTALL_DM.*/INSTALL_DM := true/' \
|
|
|
|
-e 's/INSTALL_SCORE_FILE.*/INSTALL_SCORE_FILE := true/' \
|
|
|
|
Makeconfig install-man
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.t2-project.org/packages/bsd-games.html";
|
2009-10-26 23:03:36 +00:00
|
|
|
description = "Ports of all the games from NetBSD-current that are free";
|
2021-01-15 04:31:39 +00:00
|
|
|
license = lib.licenses.free;
|
|
|
|
maintainers = with lib.maintainers; [viric];
|
|
|
|
platforms = with lib.platforms; linux;
|
2009-10-26 23:03:36 +00:00
|
|
|
};
|
|
|
|
}
|