diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index b46114ec62be..65ed964ba998 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -1,5 +1,5 @@ { fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf, -SDL2_mixer, freetype, gettext }: +SDL2_mixer, freetype, gettext, Cocoa }: stdenv.mkDerivation rec { version = "0.C"; @@ -14,7 +14,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper pkgconfig ]; - buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]; + buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ] + ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ]; postPatch = '' patchShebangs . @@ -26,7 +27,12 @@ stdenv.mkDerivation rec { -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp ''; - makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"; + makeFlags = [ + "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1" + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "NATIVE=osx CLANG=1" + "OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above + ]; postInstall = '' wrapProgram $out/bin/cataclysm-tiles \ @@ -64,6 +70,6 @@ stdenv.mkDerivation rec { homepage = http://en.cataclysmdda.com/; license = licenses.cc-by-sa-30; maintainers = [ maintainers.skeidel ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 0437a1b130f8..7d79b1347861 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -1,5 +1,5 @@ { fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf, -SDL2_mixer, freetype, gettext }: +SDL2_mixer, freetype, gettext, CoreFoundation, Cocoa }: stdenv.mkDerivation rec { version = "2017-12-09"; @@ -14,7 +14,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper pkgconfig ]; - buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ]; + buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ] + ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Cocoa ]; postPatch = '' patchShebangs . @@ -26,7 +27,11 @@ stdenv.mkDerivation rec { -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp ''; - makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"; + makeFlags = [ + "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1" + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "NATIVE=osx CLANG=1" + ]; postInstall = '' wrapProgram $out/bin/cataclysm-tiles \ @@ -65,6 +70,6 @@ stdenv.mkDerivation rec { ''; homepage = http://en.cataclysmdda.com/; license = licenses.cc-by-sa-30; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25fb245eb9e8..bd344003e531 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18139,9 +18139,13 @@ with pkgs; bzflag = callPackage ../games/bzflag { }; - cataclysm-dda = callPackage ../games/cataclysm-dda { }; + cataclysm-dda = callPackage ../games/cataclysm-dda { + inherit (darwin.apple_sdk.frameworks) Cocoa; + }; - cataclysm-dda-git = callPackage ../games/cataclysm-dda/git.nix { }; + cataclysm-dda-git = callPackage ../games/cataclysm-dda/git.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa; + }; chessdb = callPackage ../games/chessdb { };