1 { lib, stdenv, fetchurl, unzip, patchelf, xorg, openal }:
6 # Untrusted mirrors - do not update hashes
7 "https://ludios.org/mirror/ue4demos/${file}"
8 "https://web.archive.org/web/20140824192039/http://ue4linux.raxxy.com/${file}"
11 buildDemo = { name, src }:
12 stdenv.mkDerivation rec {
15 nativeBuildInputs = [ unzip patchelf ];
17 rtdeps = lib.makeLibraryPath
18 [ xorg.libXxf86vm xorg.libXext openal ]
19 + ":" + lib.makeSearchPathOutput "lib" "lib64" [ stdenv.cc.cc ];
27 interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
28 binary=$(find . -executable -type f)
30 --set-interpreter $interpreter \
31 --set-rpath ${rtdeps} \
35 # LogLinuxPlatformFile:Warning: open('/nix/store/hash-ue4demos-demo/demo/demo/Saved/Config/CleanSourceConfigs/Engine.ini', Flags=0x00080241) failed: errno=2 (No such file or directory)
36 # for Vehicle, Shooter and Strategy games.
38 haxname=$(ls | grep ' ' | sed 's/ //g'); \
39 haxpath=$(ls | grep ' ')/$haxname/Saved; \
40 mkdir -p "$haxpath"/Config/CleanSourceConfigs; \
41 ln -s /dev/null "$haxpath"/Config/CleanSourceConfigs/Engine.ini; \
42 mkdir -p "$haxpath"/Logs; \
43 ln -s /dev/null "$haxpath"/Logs/$haxname.log)
45 # Executables are buried under a varied paths across demos.
48 ln -s "$out/$binary" $(basename "$out/$binary")
52 description = "Unreal Engine 4 Linux demos";
53 homepage = "https://wiki.unrealengine.com/Linux_Demos";
54 platforms = [ "x86_64-linux" ];
55 license = lib.licenses.unfree;
60 tappy_chicken = buildDemo {
61 name = "ue4demos-tappy_chicken";
63 urls = urls "tappy_chicken.zip";
64 sha256 = "0lwhvk3lpb2r5ng2cnzk7fpjj5lwhy2sch1a8v154x1xfhfb3h4v";
68 swing_ninja = buildDemo {
69 name = "ue4demos-swing_ninja";
71 urls = urls "swing_ninja.zip";
72 sha256 = "1bmgqqk3lda5h7nnqi59jgyrsn0clr3xs0k1jclnqf9fk0m8hjcv";
76 card_game = buildDemo {
77 name = "ue4demos-card_game";
79 urls = urls "card_game.zip";
80 sha256 = "154baqias5q7kad0c89k35jbmnmlm865sll02mi7bk1yllcckz5z";
84 vehicle_game = buildDemo {
85 name = "ue4demos-vehicle_game";
87 urls = urls "vehicle_game.zip";
88 sha256 = "03dlacf1iv7sgn7pl3sx9r6243wy8fsi2kd858syfm9slg0190bs";
92 shooter_game = buildDemo {
93 name = "ue4demos-shooter_game";
95 urls = urls "shooter_game.zip";
96 sha256 = "1bk32k349iqbqk8x8jffnqq0pjiqmvrvv675xxmlvkkr8qrlhz98";
100 strategy_game = buildDemo {
101 name = "ue4demos-strategy_game";
103 urls = urls "strategy_game.zip";
104 sha256 = "1p7i966v1ssm20y12g4wsccpgnky3szy19qyjlacynk7bgbk6lg7";
108 black_jack = buildDemo {
109 name = "ue4demos-black_jack";
111 urls = urls "black_jack.zip";
112 sha256 = "0g52wkzn5isa3az32y25yx5b56wxks97pajqwkmm6gf4qpkfksxv";
116 landscape_mountains = buildDemo {
117 name = "ue4demos-landscape_mountains";
119 urls = urls "landscape_mountains.zip";
120 sha256 = "14jzajhs3cpydvf3ag7lpj4hkpbjpwnn3xkdvdx92fi0pcl8cwym";
124 matinee_demo = buildDemo {
125 name = "ue4demos-matinee_demo";
127 urls = urls "matinee_demo.zip";
128 sha256 = "0ib8k6fl15cxzdarar2sqq5v3g3c7p2jidkdjd00nym6cvkibb4d";
132 elemental_demo = buildDemo {
133 name = "ue4demos-elemental_demo";
135 urls = urls "elemental_demo.zip";
136 sha256 = "1v4jdsy8jvv8wgc8dx17q17xigfrya5q0nfdzw4md7fzm3bg9z0v";
140 effects_cave_demo = buildDemo {
141 name = "ue4demos-effects_cave_demo";
143 urls = urls "effects_cave_demo.zip";
144 sha256 = "0lvd3aaha2x9pnpkdmrzi6nf7hymr95834z3l8shygjf9kbbzsz4";
148 realistic_rendering = buildDemo {
149 name = "ue4demos-realistic_rendering";
151 urls = urls "realistic_rendering_demo.zip";
152 sha256 = "0r16nznkv475hkw5rnngqsc69ch8vh86dppyyyr9nn43dkr2110a";
156 reflections_subway = buildDemo {
157 name = "ue4demos-reflections_subway";
159 urls = urls "reflections_subway_demo.zip";
160 sha256 = "0dw5sm7405gxw9iqz0vpnhdprrb4wl5i14pvzl1381k973m8bd00";
164 scifi_hallway_demo = buildDemo {
165 name = "ue4demos-scifi_hallway_demo";
167 urls = urls "sci-fi_hallway_demo.zip";
168 sha256 = "14qp9iwm47awn8d9j6ijh6cnds308x60xs4vi2fvz2666jlz1pq2";
172 mobile_temple_demo = buildDemo {
173 name = "ue4demos-mobile_temple_demo";
175 urls = urls "mobile_temple_demo.zip";
176 sha256 = "12bz4h1b9lhmqglwsa6r8q48ijqbjdha9fql31540d01kigaka75";
180 stylized_demo = buildDemo {
181 name = "ue4demos-stylized_demo";
183 urls = urls "stylized_demo.zip";
184 sha256 = "1676ridmj8rk4y4hbdscfnnka5l636av1xxl0qwvk236kq9j7v0l";
188 blueprint_examples_demo = buildDemo {
189 name = "ue4demos-blueprint_examples_demo";
191 urls = urls "blueprint_examples_demo.zip";
192 sha256 = "076q33h2hy965fvr805hsprkpcmizf638lj2ik8k923v86b15nbv";