1
- { stdenv , gtk3 , pkgconfig , libX11 , perl , fetchurl , automake115x , autoconf } :
2
- let
1
+ { stdenv , fetchurl
2
+ , gtk3 , libX11
3
+ , makeWrapper , pkgconfig , perl , autoreconfHook , wrapGAppsHook
4
+ } :
5
+
6
+ stdenv . mkDerivation rec {
7
+ name = "sgt-puzzles-r${ version } " ;
3
8
version = "20170228.1f613ba" ;
4
- buildInputs = [
5
- gtk3 pkgconfig libX11 perl automake115x autoconf
6
- ] ;
7
- in
8
- stdenv . mkDerivation {
9
+
9
10
src = fetchurl {
10
11
url = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/puzzles-${ version } .tar.gz" ;
11
12
sha256 = "02nqc18fhvxr545wgk55ly61fi0a06q61ljzwadprqxa1n0g0fz5" ;
12
13
} ;
13
- name = "sgt-puzzles-r" + version ;
14
- inherit buildInputs ;
14
+
15
+ nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig perl wrapGAppsHook ] ;
16
+
17
+ buildInputs = [ gtk3 libX11 ] ;
18
+
15
19
makeFlags = [ "prefix=$(out)" "gamesdir=$(out)/bin" ] ;
16
20
preInstall = ''
17
21
mkdir -p "$out"/{bin,share/doc/sgtpuzzles}
18
22
cp gamedesc.txt LICENCE README "$out/share/doc/sgtpuzzles"
19
- cp LICENCE "$out/share/doc/sgtpuzzles/LICENSE"
20
23
'' ;
21
24
# SGT Puzzles use generic names like net, map, etc.
22
25
# Create symlinks with sgt-puzzle- prefix for possibility of
@@ -33,12 +36,11 @@ stdenv.mkDerivation {
33
36
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-error"
34
37
cp Makefile.gtk Makefile
35
38
'' ;
36
- meta = {
37
- inherit version ;
39
+ meta = with stdenv . lib ; {
38
40
description = "Simon Tatham's portable puzzle collection" ;
39
- license = stdenv . lib . licenses . mit ;
40
- maintainers = [ stdenv . lib . maintainers . raskin ] ;
41
- platforms = stdenv . lib . platforms . linux ;
41
+ license = licenses . mit ;
42
+ maintainers = [ maintainers . raskin ] ;
43
+ platforms = platforms . linux ;
42
44
homepage = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/" ;
43
45
} ;
44
46
}
0 commit comments