tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
gnushogi: refactor, unbreak on darwin
Weijia Wang
2 years ago
60849da9
027259f3
+18
-9
1 changed file
expand all
collapse all
unified
split
pkgs
games
gnushogi
default.nix
+18
-9
pkgs/games/gnushogi/default.nix
···
1
-
{ lib, stdenv, fetchurl, zlib }:
0
0
0
0
0
2
3
stdenv.mkDerivation rec {
4
pname = "gnushogi";
5
version = "1.4.2";
6
-
buildInputs = [ zlib ];
7
8
src = fetchurl {
9
url = "mirror://gnu/gnushogi/${pname}-${version}.tar.gz";
10
-
sha256 = "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y";
11
};
12
13
-
env.LDFLAGS = lib.optionalString (!stdenv.isDarwin) "-Wl,-z,muldefs";
0
0
0
0
0
0
0
0
0
14
15
-
# Makefile ignores errors, so the build may silently succeed erroneously
16
-
postBuild = ''
17
-
test -e gnushogi/gnushogi || { echo "ERROR: no binary produced"; exit 1; }
18
-
'';
19
20
meta = with lib; {
21
description = "GNU implementation of Shogi, also known as Japanese Chess";
···
23
license = licenses.gpl3;
24
maintainers = [ maintainers.ciil ];
25
platforms = platforms.unix;
26
-
broken = stdenv.isDarwin; # darwin does not support -z muldefs
27
};
28
}
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchurl
4
+
, fetchpatch
5
+
, zlib
6
+
}:
7
8
stdenv.mkDerivation rec {
9
pname = "gnushogi";
10
version = "1.4.2";
0
11
12
src = fetchurl {
13
url = "mirror://gnu/gnushogi/${pname}-${version}.tar.gz";
14
+
hash = "sha256-HsxIqGYwPGNlJVKzJdaF5+9emJMkQIApGmHZZQXVKyk=";
15
};
16
17
+
patches = [
18
+
(fetchpatch {
19
+
url = "https://sources.debian.org/data/main/g/gnushogi/1.4.2-7/debian/patches/01-make-dont-ignore";
20
+
hash = "sha256-Aw0zfH+wkj+rQQzKIn6bSilP76YIO27FwJ8n1UzG6ow=";
21
+
})
22
+
(fetchpatch {
23
+
url = "https://sources.debian.org/data/main/g/gnushogi/1.4.2-7/debian/patches/globals";
24
+
hash = "sha256-wZJBPMYSz4n1kOyLmR9QOp70650R9xXQUWD5hvaMRok=";
25
+
})
26
+
];
27
28
+
buildInputs = [ zlib ];
0
0
0
29
30
meta = with lib; {
31
description = "GNU implementation of Shogi, also known as Japanese Chess";
···
33
license = licenses.gpl3;
34
maintainers = [ maintainers.ciil ];
35
platforms = platforms.unix;
0
36
};
37
}