2016-05-15 22:13:09 +02:00
|
|
|
{stdenv, gtk3, pkgconfig, libX11, perl, fetchurl, automake115x, autoconf}:
|
2015-07-05 10:57:38 +02:00
|
|
|
let
|
2017-01-02 18:06:09 +01:00
|
|
|
version = "20161228.7cae89f";
|
2015-07-05 10:57:38 +02:00
|
|
|
buildInputs = [
|
2016-05-15 22:13:09 +02:00
|
|
|
gtk3 pkgconfig libX11 perl automake115x autoconf
|
2008-12-15 12:55:53 +01:00
|
|
|
];
|
|
|
|
in
|
2015-07-05 10:57:38 +02:00
|
|
|
stdenv.mkDerivation {
|
2016-04-20 11:33:35 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${version}.tar.gz";
|
2017-01-02 18:06:09 +01:00
|
|
|
sha256 = "0kqy3gdgfjgaqbjl95pnljz44v91i79qphwdp91k0n5alswxwn76";
|
2015-07-05 10:57:38 +02:00
|
|
|
};
|
|
|
|
name = "sgt-puzzles-r" + version;
|
2008-12-15 12:55:53 +01:00
|
|
|
inherit buildInputs;
|
2015-07-05 10:57:38 +02:00
|
|
|
makeFlags = ["prefix=$(out)" "gamesdir=$(out)/bin"];
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out"/{bin,share/doc/sgtpuzzles}
|
2015-07-12 23:55:24 +02:00
|
|
|
cp gamedesc.txt LICENCE README "$out/share/doc/sgtpuzzles"
|
2015-07-05 10:57:38 +02:00
|
|
|
cp LICENCE "$out/share/doc/sgtpuzzles/LICENSE"
|
|
|
|
'';
|
2016-05-20 11:21:38 +02:00
|
|
|
# SGT Puzzles use generic names like net, map, etc.
|
|
|
|
# Create symlinks with sgt-puzzle- prefix for possibility of
|
|
|
|
# disambiguation
|
|
|
|
postInstall = ''
|
|
|
|
(
|
|
|
|
cd "$out"/bin ;
|
|
|
|
for i in *; do ln -s "$i" "sgt-puzzle-$i"; done
|
|
|
|
)
|
|
|
|
'';
|
2015-07-05 10:57:38 +02:00
|
|
|
preConfigure = ''
|
2010-01-15 12:46:12 +01:00
|
|
|
perl mkfiles.pl
|
2010-02-18 14:40:10 +01:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lX11"
|
2013-03-21 14:35:18 +01:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error"
|
2015-07-05 10:57:38 +02:00
|
|
|
cp Makefile.gtk Makefile
|
2010-02-18 14:40:10 +01:00
|
|
|
'';
|
2008-12-15 12:55:53 +01:00
|
|
|
meta = {
|
2015-07-05 10:57:38 +02:00
|
|
|
inherit version;
|
2008-12-15 12:55:53 +01:00
|
|
|
description = "Simon Tatham's portable puzzle collection";
|
2015-07-05 10:57:38 +02:00
|
|
|
license = stdenv.lib.licenses.mit ;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2016-04-20 11:33:35 +02:00
|
|
|
homepage = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/";
|
2008-12-15 12:55:53 +01:00
|
|
|
};
|
|
|
|
}
|