88 bison ,
99 less ,
1010 miscfiles ,
11+ fetchpatch ,
1112} :
1213
13- stdenv . mkDerivation rec {
14+ stdenv . mkDerivation ( finalAttrs : {
1415 pname = "bsd-games" ;
1516 version = "2.17" ;
1617
1718 src = fetchurl {
18- url = "mirror://ibiblioPubLinux/games/${ pname } - ${ version } .tar.gz" ;
19+ url = "mirror://ibiblioPubLinux/games/bsd-games- ${ finalAttrs . version } .tar.gz" ;
1920 hash = "sha256-Bm+SSu9sHF6pRvWI428wMCH138CTlEc48CXY7bxv/2A=" ;
2021 } ;
2122
@@ -27,10 +28,31 @@ stdenv.mkDerivation rec {
2728 ] ;
2829
2930 patches = [
30- # Remove UTMPX support on Makefrag file
31- ( fetchurl {
31+ # Follow All patches from http://t2sde.org/packages/bsd-games.html
32+ # May be removed in the next version
33+ ( fetchpatch {
34+ url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/delay_output-sym.patch" ;
35+ hash = "sha256-qbtp2cJVmEuxbTgpXM2gRHSNLE25OCmNxK+aeBBPRBw=" ;
36+ } )
37+ ( fetchpatch {
3238 url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/dm-noutmpx.patch" ;
33- sha256 = "1k3qp3jj0dksjr4dnppv6dvkwslrgk9c7p2n9vipqildpxgqp7w2" ;
39+ hash = "sha256-oioJ5M7DAUVzX8k998p2h/APn8azw9Z8txmBuly2ouw=" ;
40+ } )
41+ ( fetchpatch {
42+ url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/hotfix-gcc43.patch" ;
43+ hash = "sha256-9pkJmEOmM5vd/5nm3AlsbJNX0oX1kCtFrmciGpStvlA=" ;
44+ } )
45+ ( fetchpatch {
46+ url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/hotfix-glibc.patch" ;
47+ hash = "sha256-yNL88XORTXl2qSYTlYCYDN2G++TzBxywBpYdK+ufwrA=" ;
48+ } )
49+ ( fetchpatch {
50+ url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/hotfix.patch" ;
51+ hash = "sha256-UFXvtfVzJLRWvzbv0gaoVdt0vZOUj4UWWqoCZL/BDqE=" ;
52+ } )
53+ ( fetchpatch {
54+ url = "http://svn.exactcode.de/t2/trunk/package/games/bsd-games/postfix-bsd.patch" ;
55+ hash = "sha256-Noqq+FpSJb3heejGGHyLYYkHB3fC4qCv/p1XMfEGdx8=" ;
3456 } )
3557 ] ;
3658
@@ -59,26 +81,31 @@ stdenv.mkDerivation rec {
5981 bsd_games_cfg_pager=${ less }
6082 EOF
6183
62- sed -e s/getline/bsdgames_local_getline/g -i $(grep getline -rl .)
84+ sed -e '/sigpause/d' -i hunt/hunt/otto.c
6385 '' ;
6486
6587 postConfigure = ''
6688 sed -i -e 's,/usr,'$out, \
6789 -e "s,-o root -g root, ," \
6890 -e "s,-o root -g games, ," \
6991 -e "s,.*chown.*,true," \
92+ -e 's/install -c -m 2755/install -Dm755/' \
7093 -e 's/INSTALL_VARDATA.*/INSTALL_VARDATA := true/' \
7194 -e 's/INSTALL_HACKDIR.*/INSTALL_HACKDIR := true/' \
7295 -e 's/INSTALL_DM.*/INSTALL_DM := true/' \
7396 -e 's/INSTALL_SCORE_FILE.*/INSTALL_SCORE_FILE := true/' \
7497 Makeconfig install-man
7598 '' ;
7699
100+ preInstall = ''
101+ mkdir -p $out/bin
102+ '' ;
103+
77104 meta = {
78105 homepage = "http://www.t2-project.org/packages/bsd-games.html" ;
79106 description = "Ports of all the games from NetBSD-current that are free" ;
80107 license = lib . licenses . free ;
81108 maintainers = with lib . maintainers ; [ viric ] ;
82109 platforms = with lib . platforms ; linux ;
83110 } ;
84- }
111+ } )
0 commit comments