git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #34144 from mnacamura/cdda-fix-share-dir

cataclysm-dda{,-git}: fix share directory

commitbb7e2445316aa585a2d8f71f0c64bc900f51ca0c authorJörg Thalheim <Mic92@users.noreply.github.com> dateWed 24 Jan 2018, 17:39 (9 years ago) parenta3d6f38bd9b51f
2 files changed+10−16
pkgs/games/cataclysm-dda/default.nix+5−8 pkgs/games/cataclysm-dda/git.nix+5−8
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,
22SDL2_mixer, freetype, gettext, Cocoa, libicns }:
33
44stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
1212 sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
1313 };
1414
15− nativeBuildInputs = [ makeWrapper pkgconfig ]
15+ nativeBuildInputs = [ pkgconfig ]
1616 ++ stdenv.lib.optionals stdenv.isDarwin [ libicns ];
1717
1818 buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]
@@ -23,8 +23,7 @@ stdenv.mkDerivation rec {
2323 postPatch = ''
2424 patchShebangs .
2525 sed -i Makefile \
26− -e 's,-Werror,,g' \
27− -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
26+ -e 's,-Werror,,g'
2827
2928 sed '1i#include <cmath>' \
3029 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
@@ -32,6 +31,7 @@ stdenv.mkDerivation rec {
3231
3332 makeFlags = [
3433 "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!
3535 ] ++ stdenv.lib.optionals stdenv.isDarwin [
3636 "NATIVE=osx CLANG=1"
3737 "OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above
@@ -42,10 +42,7 @@ stdenv.mkDerivation rec {
4242 png2icns data/osx/AppIcon.icns data/osx/AppIcon.iconset/*
4343 '';
4444
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 ''
4946 app=$out/Applications/Cataclysm.app
5047 install -D -m 444 data/osx/Info.plist -t $app/Contents
5148 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,
22SDL2_mixer, freetype, gettext, CoreFoundation, Cocoa }:
33
44stdenv.mkDerivation rec {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
1212 sha256 = "1a7kdmx76na4g65zra01qaq98lxp9j2dl9ddv09r0p5yxaizw68z";
1313 };
1414
15− nativeBuildInputs = [ makeWrapper pkgconfig ];
15+ nativeBuildInputs = [ pkgconfig ];
1616
1717 buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]
1818 ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Cocoa ];
@@ -22,8 +22,7 @@ stdenv.mkDerivation rec {
2222 postPatch = ''
2323 patchShebangs .
2424 sed -i Makefile \
25− -e 's,-Werror,,g' \
26− -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
25+ -e 's,-Werror,,g'
2726
2827 sed '1i#include <cmath>' \
2928 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
@@ -31,14 +30,12 @@ stdenv.mkDerivation rec {
3130
3231 makeFlags = [
3332 "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
33+ "LANGUAGES=all"
3434 ] ++ stdenv.lib.optionals stdenv.isDarwin [
3535 "NATIVE=osx CLANG=1"
3636 ];
3737
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 ''
4239 app=$out/Applications/Cataclysm.app
4340 install -D -m 444 data/osx/Info.plist -t $app/Contents
4441 install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources