2017-05-11 07:52:43 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, gtk3, libX11
|
|
|
|
, makeWrapper, pkgconfig, perl, autoreconfHook, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sgt-puzzles-r${version}";
|
2017-11-11 13:03:23 +00:00
|
|
|
version = "20171029.69773d8";
|
2017-05-11 07:52:43 +01:00
|
|
|
|
2016-04-20 10:33:35 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${version}.tar.gz";
|
2017-11-11 13:03:23 +00:00
|
|
|
sha256 = "0m1gaa802jyih9hcwpvb05zrzprgj6akafgvbsnq321s0sqzaxf0";
|
2015-07-05 09:57:38 +01:00
|
|
|
};
|
2017-05-11 07:52:43 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig perl wrapGAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [ gtk3 libX11 ];
|
|
|
|
|
2015-07-05 09:57:38 +01:00
|
|
|
makeFlags = ["prefix=$(out)" "gamesdir=$(out)/bin"];
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out"/{bin,share/doc/sgtpuzzles}
|
2015-07-12 22:55:24 +01:00
|
|
|
cp gamedesc.txt LICENCE README "$out/share/doc/sgtpuzzles"
|
2015-07-05 09:57:38 +01:00
|
|
|
'';
|
2016-05-20 10:21:38 +01: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 09:57:38 +01:00
|
|
|
preConfigure = ''
|
2010-01-15 11:46:12 +00:00
|
|
|
perl mkfiles.pl
|
2010-02-18 13:40:10 +00:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lX11"
|
2013-03-21 13:35:18 +00:00
|
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error"
|
2015-07-05 09:57:38 +01:00
|
|
|
cp Makefile.gtk Makefile
|
2010-02-18 13:40:10 +00:00
|
|
|
'';
|
2017-05-11 07:52:43 +01:00
|
|
|
meta = with stdenv.lib; {
|
2008-12-15 11:55:53 +00:00
|
|
|
description = "Simon Tatham's portable puzzle collection";
|
2017-05-11 07:52:43 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.linux;
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.chiark.greenend.org.uk/~sgtatham/puzzles/;
|
2008-12-15 11:55:53 +00:00
|
|
|
};
|
|
|
|
}
|