tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
weidu: init at 247
Peter Hoeg
4 years ago
9bf8cea0
7046ee94
+67
2 changed files
expand all
collapse all
unified
split
pkgs
tools
games
weidu
default.nix
top-level
all-packages.nix
+65
pkgs/tools/games/weidu/default.nix
···
1
1
+
{ stdenv
2
2
+
, lib
3
3
+
, fetchFromGitHub
4
4
+
, elkhound
5
5
+
, ocaml-ng
6
6
+
, perl
7
7
+
, which
8
8
+
}:
9
9
+
10
10
+
let
11
11
+
# 1. Needs ocaml >= 4.04 and <= 4.11
12
12
+
# 2. ocaml 4.10 defaults to safe (immutable) strings so we need a version with
13
13
+
# that disabled as weidu is strongly dependent on mutable strings
14
14
+
ocaml' = ocaml-ng.ocamlPackages_4_10.ocaml.overrideAttrs (old: {
15
15
+
configureFlags = old.configureFlags ++ [
16
16
+
# https://github.com/WeiDUorg/weidu/issues/197
17
17
+
"--disable-force-safe-string"
18
18
+
];
19
19
+
});
20
20
+
21
21
+
in
22
22
+
stdenv.mkDerivation rec {
23
23
+
pname = "weidu";
24
24
+
version = "247.00";
25
25
+
26
26
+
src = fetchFromGitHub {
27
27
+
owner = "WeiDUorg";
28
28
+
repo = pname;
29
29
+
rev = "v${version}";
30
30
+
sha256 = "sha256-vAIIYn0urQnnL82mdfwJtahrS3uWPFferm+0F13TKcw=";
31
31
+
};
32
32
+
33
33
+
postPatch = ''
34
34
+
substitute sample.Configuration Configuration \
35
35
+
--replace /usr/bin ${lib.makeBinPath [ ocaml' ]} \
36
36
+
--replace elkhound ${elkhound}/bin/elkhound
37
37
+
38
38
+
mkdir -p obj/{.depend,x86_LINUX}
39
39
+
'';
40
40
+
41
41
+
nativeBuildInputs = [ elkhound ocaml' perl which ];
42
42
+
43
43
+
buildFlags = [ "weidu" "weinstall" "tolower" ];
44
44
+
45
45
+
installPhase = ''
46
46
+
runHook preInstall
47
47
+
48
48
+
for b in tolower weidu weinstall; do
49
49
+
install -Dm555 $b.asm.exe $out/bin/$b
50
50
+
done
51
51
+
52
52
+
install -Dm444 -t $out/share/doc/weidu README* COPYING
53
53
+
54
54
+
runHook postInstall
55
55
+
'';
56
56
+
57
57
+
meta = with lib; {
58
58
+
description = "InfinityEngine Modding Engine";
59
59
+
homepage = "https://weidu.org";
60
60
+
license = licenses.gpl2Only;
61
61
+
maintainers = with maintainers; [ peterhoeg ];
62
62
+
# should work fine on both Darwin and Windows
63
63
+
platforms = platforms.linux;
64
64
+
};
65
65
+
}
+2
pkgs/top-level/all-packages.nix
···
871
871
872
872
elkhound = callPackage ../development/tools/elkhound { };
873
873
874
874
+
weidu = callPackage ../tools/games/weidu { };
875
875
+
874
876
gfshare = callPackage ../tools/security/gfshare { };
875
877
876
878
gobgp = callPackage ../tools/networking/gobgp { };