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