Merge pull request #34144 from mnacamura/cdda-fix-share-dir

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

authored by

Jörg Thalheim and committed by
GitHub
bb7e2445 a3d6f38a

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