git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #34144 from mnacamura/cdda-fix-share-dir
bb7e244Jörg Thalheim
pkgs/games/cataclysm-dda/default.nix+5−8
@@ -1,4 +1,4 @@
1−{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
1+{ fetchFromGitHub, stdenv, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
2SDL2_mixer, freetype, gettext, Cocoa, libicns }:
2SDL2_mixer, freetype, gettext, Cocoa, libicns }:
3
3
4stdenv.mkDerivation rec {
4stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
12 sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
12 sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
13 };
13 };
14
14
15− nativeBuildInputs = [ makeWrapper pkgconfig ]
15+ nativeBuildInputs = [ pkgconfig ]
16 ++ stdenv.lib.optionals stdenv.isDarwin [ libicns ];
16 ++ stdenv.lib.optionals stdenv.isDarwin [ libicns ];
17
17
18 buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]
18 buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]
@@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
23 postPatch = ''
23 postPatch = ''
24 patchShebangs .
24 patchShebangs .
25 sed -i Makefile \
25 sed -i Makefile \
26− -e 's,-Werror,,g' \
26+ -e 's,-Werror,,g'
27− -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
28
27
29 sed '1i#include <cmath>' \
28 sed '1i#include <cmath>' \
30 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
29 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
@@ -32,6 +31,7 @@ stdenv.mkDerivation rec {
32
31
33 makeFlags = [
32 makeFlags = [
34 "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
33 "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
34+ # "LANGUAGES=all" # vanilla C:DDA installs all translations even without this flag!
35 ] ++ stdenv.lib.optionals stdenv.isDarwin [
35 ] ++ stdenv.lib.optionals stdenv.isDarwin [
36 "NATIVE=osx CLANG=1"
36 "NATIVE=osx CLANG=1"
37 "OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above
37 "OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above
@@ -42,10 +42,7 @@ stdenv.mkDerivation rec {
42 png2icns data/osx/AppIcon.icns data/osx/AppIcon.iconset/*
42 png2icns data/osx/AppIcon.icns data/osx/AppIcon.iconset/*
43 '';
43 '';
44
44
45− postInstall = ''
46− wrapProgram $out/bin/cataclysm-tiles \
47− --add-flags "--datadir $out/share/"
48− '' + stdenv.lib.optionalString stdenv.isDarwin ''
45+ postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
49 app=$out/Applications/Cataclysm.app
46 app=$out/Applications/Cataclysm.app
50 install -D -m 444 data/osx/Info.plist -t $app/Contents
47 install -D -m 444 data/osx/Info.plist -t $app/Contents
51 install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources
48 install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources
pkgs/games/cataclysm-dda/git.nix+5−8
@@ -1,4 +1,4 @@
1−{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
1+{ fetchFromGitHub, stdenv, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
2SDL2_mixer, freetype, gettext, CoreFoundation, Cocoa }:
2SDL2_mixer, freetype, gettext, CoreFoundation, Cocoa }:
3
3
4stdenv.mkDerivation rec {
4stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
12 sha256 = "1a7kdmx76na4g65zra01qaq98lxp9j2dl9ddv09r0p5yxaizw68z";
12 sha256 = "1a7kdmx76na4g65zra01qaq98lxp9j2dl9ddv09r0p5yxaizw68z";
13 };
13 };
14
14
15− nativeBuildInputs = [ makeWrapper pkgconfig ];
15+ nativeBuildInputs = [ pkgconfig ];
16
16
17 buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]
17 buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]
18 ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Cocoa ];
18 ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Cocoa ];
@@ -22,8 +22,7 @@ stdenv.mkDerivation rec {
22 postPatch = ''
22 postPatch = ''
23 patchShebangs .
23 patchShebangs .
24 sed -i Makefile \
24 sed -i Makefile \
25− -e 's,-Werror,,g' \
25+ -e 's,-Werror,,g'
26− -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
27
26
28 sed '1i#include <cmath>' \
27 sed '1i#include <cmath>' \
29 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
28 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
@@ -31,14 +30,12 @@ stdenv.mkDerivation rec {
31
30
32 makeFlags = [
31 makeFlags = [
33 "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
32 "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
33+ "LANGUAGES=all"
34 ] ++ stdenv.lib.optionals stdenv.isDarwin [
34 ] ++ stdenv.lib.optionals stdenv.isDarwin [
35 "NATIVE=osx CLANG=1"
35 "NATIVE=osx CLANG=1"
36 ];
36 ];
37
37
38− postInstall = ''
39− wrapProgram $out/bin/cataclysm-tiles \
40− --add-flags "--datadir $out/share/cataclysm-dda/"
41− '' + stdenv.lib.optionalString stdenv.isDarwin ''
38+ postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
42 app=$out/Applications/Cataclysm.app
39 app=$out/Applications/Cataclysm.app
43 install -D -m 444 data/osx/Info.plist -t $app/Contents
40 install -D -m 444 data/osx/Info.plist -t $app/Contents
44 install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources
41 install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources