forked from zachcoyle/openage-flake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
102 lines (94 loc) · 2.46 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
description = "Free (as in freedom) open source clone of the Age of Empires II engine";
inputs = {
openage = { url = github:SFTtech/openage; flake = false; };
flake-utils.url = github:numtide/flake-utils;
nyan = { url = github:vi-tality/nyan-flake; flake = true; };
};
outputs = { self, nixpkgs, flake-utils, nyan, ... }@inputs: flake-utils.lib.eachDefaultSystem (system:
with nixpkgs.legacyPackages."${system}";
let
openage = nixpkgs.legacyPackages."${system}".stdenv.mkDerivation {
postFixup = ''
mv $out/bin/openage $out/lib/python3.8/site-packages/run.py
ln -s $out/lib/python3.8/site-packages/run.py $out/bin/run.py
'';
pname = "openage";
version = "master";
src = inputs.openage;
cmakeFlags = ["-Dnyan_DIR=${inputs.nyan.outputs.defaultPackage.x86_64-linux}/lib/cmake/nyan/"];
buildInputs = [
inputs.nyan
cmake
eigen
epoxy
fontconfig
freetype
harfbuzz
libogg
libpng
lz4
SDL2
SDL2_image
opusfile
(qtEnv "openage-qt-env" (with qt5; [
qtquick1
#qmake
qtcharts
qtconnectivity
qtdeclarative
qtdoc
#qtgamepad
qtgraphicaleffects
qtimageformats
qtlocation
qtmultimedia
qtnetworkauth
qtquickcontrols
qtquickcontrols2
qtscript
qtscxml
qtsensors
qtserialport
qtspeech
qtsvg
qttools
qttranslations
qtvirtualkeyboard
#qtwayland
qtwebchannel
qtwebengine
qtwebglplugin
qtwebkit
qtwebsockets
qtwebview
qtx11extras
qtxmlpatterns
]))
];
propagatedBuildInputs = [
(python3.buildEnv.override {
extraLibs = with pkgs.python3Packages; [
cython
numpy
jinja2
lz4
pillow
pygments
toml
];
})
dejavu_fonts
];
};
in
rec {
defaultPackage = openage;
apps = {
openage = flake-utils.lib.mkApp {
drv = defaultPackage;
name = "openage";
};
};
});
}