tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
commandergenius: 194beta -> 1822release
Nikolay Amiantov
9 years ago
b8b668fc
4197bfee
+12
-28
1 changed file
expand all
collapse all
unified
split
pkgs
games
commandergenius
default.nix
+12
-28
pkgs/games/commandergenius/default.nix
···
1
1
{ lib, stdenv, fetchFromGitHub, SDL2, SDL2_image, pkgconfig
2
2
-
, libvorbis, libogg, mesa, boost, curl, zlib, cmake }:
2
2
+
, libvorbis, mesa_noglu, boost, cmake }:
3
3
4
4
5
5
stdenv.mkDerivation rec {
6
6
name = "commandergenius-${version}";
7
7
-
version = "194beta";
7
7
+
version = "1822release";
8
8
9
9
src = fetchFromGitHub {
10
10
owner = "gerstrong";
11
11
repo = "Commander-Genius";
12
12
rev = "v${version}";
13
13
-
sha256 = "0qxqzlmadxklrhxilbqj7y94fmbv0byj6vgpl59lb77lgs4y4x47";
13
13
+
sha256 = "07vxg8p1dnnkajzs5nifxpwn4mdd1hxsw05jl25gvaimpl9p2qc8";
14
14
};
15
15
16
16
-
buildInputs = [ SDL2 SDL2_image pkgconfig libvorbis libogg mesa boost curl zlib cmake ];
17
17
-
18
18
-
patchPhase = ''
19
19
-
cat >> lib/GsKit/CMakeLists.txt <<EOF
20
20
-
execute_process(COMMAND sdl2-config --cflags
21
21
-
OUTPUT_VARIABLE CFLAGS)
22
22
-
string(REGEX REPLACE "^-I" "" CFLAGS2 \''${CFLAGS})
23
23
-
string(REGEX REPLACE " .*" "" SDLINC \''${CFLAGS2})
24
24
-
INCLUDE_DIRECTORIES(\''${SDLINC})
25
25
-
EOF
26
26
-
'';
27
27
-
28
28
-
configurePhase = ''
29
29
-
cmake -DUSE_SDL2=yes -DBUILD_TARGET=LINUX -DCMAKE_INSTALL_PREFIX:PATH=$out -DCPACK_PACKAGE_INSTALL_DIRECTORY=$out
30
30
-
sed -i 's_/usr/share_$out_g' cmake_install.cmake
31
31
-
sed -i 's_/usr/share_$out_g' src/cmake_install.cmake
32
32
-
'';
16
16
+
buildInputs = [ SDL2 SDL2_image mesa_noglu boost libvorbis ];
33
17
34
34
-
installTargets = [ ];
18
18
+
nativeBuildInputs = [ cmake pkgconfig ];
35
19
36
36
-
installPhase = ''
37
37
-
mkdir -p $out/bin
38
38
-
cp src/CGeniusExe $out/bin
20
20
+
postPatch = ''
21
21
+
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(sdl2-config --cflags)"
22
22
+
sed -i 's,APPDIR games,APPDIR bin,' src/install.cmake
39
23
'';
40
24
41
41
-
meta = {
25
25
+
meta = with stdenv.lib; {
42
26
description = "Modern Interpreter for the Commander Keen Games";
43
27
longdescription = ''
44
28
Commander Genius is an open-source clone of
···
48
32
are required to do so
49
33
'';
50
34
homepage = "https://github.com/gerstrong/Commander-Genius";
51
51
-
maintainers = with stdenv.lib.maintainers; [ hce ];
52
52
-
license = stdenv.lib.licenses.gpl2;
53
53
-
platforms = with stdenv.lib.platforms; linux;
35
35
+
maintainers = with maintainers; [ hce ];
36
36
+
license = licenses.gpl2;
37
37
+
platforms = platforms.linux;
54
38
};
55
39
}