2015-09-15 10:26:18 +01:00
{ stdenv , fetchurl , unzip , patchelf , xorg , openal }:
2014-09-12 18:00:25 +01:00
let
2018-12-23 22:17:51 +00:00
urls = file :
[
# Untrusted mirrors - do not update hashes
" h t t p s : / / l u d i o s . o r g / m i r r o r / u e 4 d e m o s / ${ file } "
" h t t p : / / w e b . a r c h i v e . o r g / w e b / 2 0 1 4 0 8 2 4 1 9 2 0 3 9 / h t t p : / / u e 4 l i n u x . r a x x y . c o m / ${ file } "
] ;
2014-09-12 18:00:25 +01:00
buildDemo = { name , src }:
stdenv . mkDerivation rec {
inherit name src ;
2018-09-27 22:38:10 +01:00
nativeBuildInputs = [ unzip patchelf ] ;
2014-09-12 18:00:25 +01:00
rtdeps = stdenv . lib . makeLibraryPath
2015-09-15 10:26:18 +01:00
[ xorg . libXxf86vm xorg . libXext openal ]
2016-04-14 16:14:28 +01:00
+ " : " + stdenv . lib . makeSearchPathOutput " l i b " " l i b 6 4 " [ stdenv . cc . cc ] ;
2014-09-12 18:00:25 +01:00
buildCommand =
''
mkdir - p " $ o u t "
cd $ out
unzip $ src
2015-04-26 18:54:51 +01:00
interpreter = $ ( echo $ { stdenv . glibc . out } /lib/ld-linux * . so .2 )
2014-09-12 18:00:25 +01:00
binary = $ ( find . - executable - type f )
patchelf \
- - set-interpreter $ interpreter \
- - set-rpath $ { rtdeps } \
" $ b i n a r y "
# Workaround on
# 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)
# for Vehicle, Shooter and Strategy games.
ls | grep ' ' && $ (
haxname = $ ( ls | grep ' ' | sed ' s / // g' ) ; \
haxpath = $ ( ls | grep ' ' ) / $ haxname/Saved ; \
mkdir - p " $ h a x p a t h " /Config/CleanSourceConfigs ; \
ln - s /dev/null " $ h a x p a t h " /Config/CleanSourceConfigs/Engine.ini ; \
mkdir - p " $ h a x p a t h " /Logs ; \
ln - s /dev/null " $ h a x p a t h " /Logs / $ haxname . log )
# Executables are buried under a varied paths across demos.
mkdir bin
cd bin
ln - s " $ o u t / $ b i n a r y " $ ( basename " $ o u t / $ b i n a r y " )
'' ;
meta = {
description = " U n r e a l E n g i n e 4 L i n u x d e m o s " ;
2020-04-01 02:11:51 +01:00
homepage = " h t t p s : / / w i k i . u n r e a l e n g i n e . c o m / L i n u x _ D e m o s " ;
2018-05-03 06:58:11 +01:00
platforms = [ " x 8 6 _ 6 4 - l i n u x " ] ;
2014-09-12 18:00:25 +01:00
license = stdenv . lib . licenses . unfree ;
} ;
} ;
in {
2019-08-13 22:52:01 +01:00
tappy_chicken = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - t a p p y _ c h i c k e n " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " t a p p y _ c h i c k e n . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 l w h v k 3 l p b 2 r 5 n g 2 c n z k 7 f p j j 5 l w h y 2 s c h 1 a 8 v 1 5 4 x 1 x f h f b 3 h 4 v " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
swing_ninja = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - s w i n g _ n i n j a " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " s w i n g _ n i n j a . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 b m g q q k 3 l d a 5 h 7 n n q i 5 9 j g y r s n 0 c l r 3 x s 0 k 1 j c l n q f 9 f k 0 m 8 h j c v " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
card_game = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - c a r d _ g a m e " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " c a r d _ g a m e . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 5 4 b a q i a s 5 q 7 k a d 0 c 8 9 k 3 5 j b m n m l m 8 6 5 s l l 0 2 m i 7 b k 1 y l l c c k z 5 z " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
vehicle_game = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - v e h i c l e _ g a m e " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " v e h i c l e _ g a m e . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 3 d l a c f 1 i v 7 s g n 7 p l 3 s x 9 r 6 2 4 3 w y 8 f s i 2 k d 8 5 8 s y f m 9 s l g 0 1 9 0 b s " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
shooter_game = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - s h o o t e r _ g a m e " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " s h o o t e r _ g a m e . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 b k 3 2 k 3 4 9 i q b q k 8 x 8 j f f n q q 0 p j i q m v r v v 6 7 5 x x m l v k k r 8 q r l h z 9 8 " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
strategy_game = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - s t r a t e g y _ g a m e " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " s t r a t e g y _ g a m e . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 p 7 i 9 6 6 v 1 s s m 2 0 y 1 2 g 4 w s c c p g n k y 3 s z y 1 9 q y j l a c y n k 7 b g b k 6 l g 7 " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
black_jack = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - b l a c k _ j a c k " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " b l a c k _ j a c k . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 g 5 2 w k z n 5 i s a 3 a z 3 2 y 2 5 y x 5 b 5 6 w x k s 9 7 p a j q w k m m 6 g f 4 q p k f k s x v " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
landscape_mountains = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - l a n d s c a p e _ m o u n t a i n s " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " l a n d s c a p e _ m o u n t a i n s . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 4 j z a j h s 3 c p y d v f 3 a g 7 l p j 4 h k p b j p w n n 3 x k d v d x 9 2 f i 0 p c l 8 c w y m " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
matinee_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - m a t i n e e _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " m a t i n e e _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 i b 8 k 6 f l 1 5 c x z d a r a r 2 s q q 5 v 3 g 3 c 7 p 2 j i d k d j d 0 0 n y m 6 c v k i b b 4 d " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
elemental_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - e l e m e n t a l _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " e l e m e n t a l _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 v 4 j d s y 8 j v v 8 w g c 8 d x 1 7 q 1 7 x i g f r y a 5 q 0 n f d z w 4 m d 7 f z m 3 b g 9 z 0 v " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
effects_cave_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - e f f e c t s _ c a v e _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " e f f e c t s _ c a v e _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 l v d 3 a a h a 2 x 9 p n p k d m r z i 6 n f 7 h y m r 9 5 8 3 4 z 3 l 8 s h y g j f 9 k b b z s z 4 " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
realistic_rendering = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - r e a l i s t i c _ r e n d e r i n g " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " r e a l i s t i c _ r e n d e r i n g _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 r 1 6 n z n k v 4 7 5 h k w 5 r n n g q s c 6 9 c h 8 v h 8 6 d p p y y y r 9 n n 4 3 d k r 2 1 1 0 a " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
reflections_subway = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - r e f l e c t i o n s _ s u b w a y " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " r e f l e c t i o n s _ s u b w a y _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 d w 5 s m 7 4 0 5 g x w 9 i q z 0 v p n h d p r r b 4 w l 5 i 1 4 p v z l 1 3 8 1 k 9 7 3 m 8 b d 0 0 " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
scifi_hallway_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - s c i f i _ h a l l w a y _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " s c i - f i _ h a l l w a y _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 4 q p 9 i w m 4 7 a w n 8 d 9 j 6 i j h 6 c n d s 3 0 8 x 6 0 x s 4 v i 2 f v z 2 6 6 6 j l z 1 p q 2 " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
mobile_temple_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - m o b i l e _ t e m p l e _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " m o b i l e _ t e m p l e _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 2 b z 4 h 1 b 9 l h m q g l w s a 6 r 8 q 4 8 i j q b j d h a 9 f q l 3 1 5 4 0 d 0 1 k i g a k a 7 5 " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
stylized_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - s t y l i z e d _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " s t y l i z e d _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 1 6 7 6 r i d m j 8 r k 4 y 4 h b d s c f n n k a 5 l 6 3 6 a v 1 x x l 0 q w v k 2 3 6 k q 9 j 7 v 0 l " ;
} ;
} ;
2019-08-13 22:52:01 +01:00
blueprint_examples_demo = buildDemo {
2014-09-12 18:00:25 +01:00
name = " u e 4 d e m o s - b l u e p r i n t _ e x a m p l e s _ d e m o " ;
src = fetchurl {
2018-12-23 22:17:51 +00:00
urls = urls " b l u e p r i n t _ e x a m p l e s _ d e m o . z i p " ;
2014-09-12 18:00:25 +01:00
sha256 = " 0 7 6 q 3 3 h 2 h y 9 6 5 f v r 8 0 5 h s p r k p c m i z f 6 3 8 l j 2 i k 8 k 9 2 3 v 8 6 b 1 5 n b v " ;
} ;
} ;
}