tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
devilutionx: 1.3.0 -> 1.4.0
Sandro Jäckel
3 years ago
db4a2977
a67950f2
+42
-19
1 changed file
expand all
collapse all
unified
split
pkgs
games
devilutionx
default.nix
+42
-19
pkgs/games/devilutionx/default.nix
···
3
3
, fetchFromGitHub
4
4
, fetchpatch
5
5
, fetchurl
6
6
-
, fetchzip
6
6
+
, bzip2
7
7
, cmake
8
8
, pkg-config
9
9
, gettext
10
10
+
, libsodium
10
11
, SDL2
12
12
+
, SDL_audiolib
11
13
, SDL2_image
12
14
, fmt
13
15
, libpng
···
16
18
17
19
let
18
20
# TODO: submit a PR upstream to allow system copies of these libraries where possible
21
21
+
22
22
+
# fork with patches, far behind upstream
19
23
asio = fetchurl {
20
24
url = "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz";
21
25
sha256 = "0vhb4cig40mm0a98i74grpmfkcmby8zxg6vqa38dpryxpgvp5fw8";
22
26
};
23
27
24
24
-
SDL_audiolib = fetchurl {
25
25
-
url = "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz";
26
26
-
sha256 = "0z4rizncp6gqsy72b3709zc9fr915wgcwnlx1fhhy7mrczsly630";
28
28
+
# fork with patches, upstream seems to be dead
29
29
+
libmpq = fetchurl {
30
30
+
url = "https://github.com/diasurgical/libmpq/archive/0f10bd1600f406b13932bf5351ba713361262184.tar.gz";
31
31
+
sha256 = "sha256-7hc/Xtsg8WJIJljLydS7hLZA9lEEHWhsCteyrxK68qE=";
32
32
+
};
33
33
+
34
34
+
# not "real" package with pkg-config or cmake file, just collection of source files
35
35
+
libsmackerdec = fetchurl {
36
36
+
url = "https://github.com/diasurgical/libsmackerdec/archive/2997ee0e41e91bb723003bc09234be553b190e38.tar.gz";
37
37
+
sha256 = "sha256-QMDcIZQ94i4VPVanmSxiGkKgxWx82DP4uE+Q5I2nU+o=";
38
38
+
};
39
39
+
40
40
+
# fork with patches, far behind upstream
41
41
+
libzt = fetchFromGitHub {
42
42
+
owner = "diasurgical";
43
43
+
repo = "libzt";
44
44
+
fetchSubmodules = true;
45
45
+
rev = "a34ba7f1cc2e41b05badd25d1b01fdc5fd2f4e02";
46
46
+
sha256 = "sha256-tyIPt+7OTi5W+5X/ixQP1puOKdhrqRZtpwXlWFBFpc8=";
27
47
};
28
48
29
29
-
simpleini = fetchzip {
30
30
-
url = "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip";
31
31
-
sha256 = "07kf1jjbc9v04hsysa6v2wh1m9csf5qz0b1wmlkf9sj00kf47zj7";
49
49
+
# missing pkg-config and/or cmake file
50
50
+
simpleini = fetchurl {
51
51
+
url = "https://github.com/brofield/simpleini/archive/9b3ed7ec815997bc8c5b9edf140d6bde653e1458.tar.gz";
52
52
+
sha256 = "sha256-93kuyp8/ew7okW/6ThJMtLMZsR1YSeFcXu9Y65ELBFE==";
32
53
};
33
54
in
34
55
35
56
stdenv.mkDerivation rec {
36
57
pname = "devilutionx";
37
37
-
version = "1.3.0";
58
58
+
version = "1.4.0";
38
59
39
60
src = fetchFromGitHub {
40
61
owner = "diasurgical";
41
62
repo = "devilutionX";
42
63
rev = version;
43
43
-
sha256 = "0acrkqi0pr3cbr5i1a1vfrnxv1n3xmql5d86bm2gywvpdb94xads";
64
64
+
sha256 = "sha256-uuIPTdgGpHA8j1M8b+kfnBuiJ5mdS9rckvEfn2h7lmo=";
44
65
};
45
66
46
67
patches = [
47
47
-
# allow building with system SDL2_image instead of vendored version
48
48
-
# this patch can be removed on the next release of devilutionx
49
49
-
# see https://github.com/diasurgical/devilutionX/pull/3386
50
68
(fetchpatch {
51
51
-
url = "https://github.com/diasurgical/devilutionX/commit/41ff03e94c02477bffb2d62764e8624c0e06854d.patch";
52
52
-
sha256 = "1lrnb9d0dcdyd78rix5rl4p8kkwbnl91llr9fgb86ysm3q58qkvj";
69
69
+
url = "https://github.com/diasurgical/devilutionX/commit/03b22352fc9e1ecb88b20a053c90c04a50717267.patch";
70
70
+
sha256 = "sha256-5aAwi1NV8P+nLLbEEnlwLGNQCQBb0nQkIVe5tR5Shsw=";
53
71
})
54
72
];
55
73
···
57
75
substituteInPlace Source/init.cpp --replace "/usr/share/diasurgical/devilutionx/" "${placeholder "out"}/share/diasurgical/devilutionx/"
58
76
59
77
# download dependencies ahead of time
60
60
-
substituteInPlace 3rdParty/asio/CMakeLists.txt --replace "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz" "${asio}"
61
61
-
substituteInPlace 3rdParty/SDL_audiolib/CMakeLists.txt --replace "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz" "${SDL_audiolib}"
62
62
-
substituteInPlace 3rdParty/simpleini/CMakeLists.txt --replace "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip" "${simpleini}"
78
78
+
substituteInPlace 3rdParty/asio/CMakeLists.txt --replace "${asio.url}" "${asio}"
79
79
+
substituteInPlace 3rdParty/libmpq/CMakeLists.txt --replace "${libmpq.url}" "${libmpq}"
80
80
+
substituteInPlace 3rdParty/libsmackerdec/CMakeLists.txt --replace "${libsmackerdec.url}" "${libsmackerdec}"
81
81
+
substituteInPlace 3rdParty/libzt/CMakeLists.txt \
82
82
+
--replace "GIT_REPOSITORY https://github.com/diasurgical/libzt.git" "" \
83
83
+
--replace "GIT_TAG ${libzt.rev}" "SOURCE_DIR ${libzt}"
84
84
+
substituteInPlace 3rdParty/simpleini/CMakeLists.txt --replace "${simpleini.url}" "${simpleini}"
63
85
'';
64
86
65
87
cmakeFlags = [
66
88
"-DBINARY_RELEASE=ON"
67
89
"-DVERSION_NUM=${version}"
68
68
-
"-DPACKET_ENCRYPTION=OFF" # FIXME: build with libsodium
69
69
-
"-DDISABLE_ZERO_TIER=ON" # FIXME: build with libzt
70
90
];
71
91
72
92
nativeBuildInputs = [
···
77
97
];
78
98
79
99
buildInputs = [
100
100
+
bzip2
80
101
fmt
81
102
libpng
103
103
+
libsodium
82
104
SDL2
105
105
+
SDL_audiolib
83
106
SDL2_image
84
107
];
85
108