diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-01-24 17:39:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 17:39:51 +0000 |
commit | bb7e2445316aa585a2d8f71f0c64bc900f51ca0c (patch) | |
tree | 342daffc46c1269920fb2dbdaf6c49f16f2fd63b | |
parent | a3d6f38adf2f0734f05acb521c5cf6bc5e2dad2c (diff) | |
parent | bd9b51f4df7fb2d88295a813f51e97f5acc46a59 (diff) | |
download | nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.tar nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.tar.gz nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.tar.bz2 nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.tar.lz nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.tar.xz nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.tar.zst nixlib-bb7e2445316aa585a2d8f71f0c64bc900f51ca0c.zip |
Merge pull request #34144 from mnacamura/cdda-fix-share-dir
cataclysm-dda{,-git}: fix share directory
-rw-r--r-- | pkgs/games/cataclysm-dda/default.nix | 13 | ||||
-rw-r--r-- | pkgs/games/cataclysm-dda/git.nix | 13 |
2 files changed, 10 insertions, 16 deletions
diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index 550d557e57ef..be6f32654305 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf, +{ fetchFromGitHub, stdenv, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, freetype, gettext, Cocoa, libicns }: stdenv.mkDerivation rec { @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv"; }; - nativeBuildInputs = [ makeWrapper pkgconfig ] + nativeBuildInputs = [ pkgconfig ] ++ stdenv.lib.optionals stdenv.isDarwin [ libicns ]; buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ] @@ -23,8 +23,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs . sed -i Makefile \ - -e 's,-Werror,,g' \ - -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g' + -e 's,-Werror,,g' sed '1i#include <cmath>' \ -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp @@ -32,6 +31,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1" + # "LANGUAGES=all" # vanilla C:DDA installs all translations even without this flag! ] ++ stdenv.lib.optionals stdenv.isDarwin [ "NATIVE=osx CLANG=1" "OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above @@ -42,10 +42,7 @@ stdenv.mkDerivation rec { png2icns data/osx/AppIcon.icns data/osx/AppIcon.iconset/* ''; - postInstall = '' - wrapProgram $out/bin/cataclysm-tiles \ - --add-flags "--datadir $out/share/" - '' + stdenv.lib.optionalString stdenv.isDarwin '' + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' app=$out/Applications/Cataclysm.app install -D -m 444 data/osx/Info.plist -t $app/Contents install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 264dc8b65a07..3d8ec7d68448 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf, +{ fetchFromGitHub, stdenv, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, freetype, gettext, CoreFoundation, Cocoa }: stdenv.mkDerivation rec { @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "1a7kdmx76na4g65zra01qaq98lxp9j2dl9ddv09r0p5yxaizw68z"; }; - nativeBuildInputs = [ makeWrapper pkgconfig ]; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Cocoa ]; @@ -22,8 +22,7 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs . sed -i Makefile \ - -e 's,-Werror,,g' \ - -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g' + -e 's,-Werror,,g' sed '1i#include <cmath>' \ -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp @@ -31,14 +30,12 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1" + "LANGUAGES=all" ] ++ stdenv.lib.optionals stdenv.isDarwin [ "NATIVE=osx CLANG=1" ]; - postInstall = '' - wrapProgram $out/bin/cataclysm-tiles \ - --add-flags "--datadir $out/share/cataclysm-dda/" - '' + stdenv.lib.optionalString stdenv.isDarwin '' + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' app=$out/Applications/Cataclysm.app install -D -m 444 data/osx/Info.plist -t $app/Contents install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources |