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