git.iko.soy/typeable/nixpkgs
on master help sign in
cataclysm-dda{,-git}: build on Darwin
commit728a13271e62715f5f44ad4353dc4223e1114aa1 authorMitsuhiro Nakamura <m.nacamura@gmail.com> dateMon 22 Jan 2018, 00:01 (9 years ago) parentd1a04ef
3 files changed+25−10
pkgs/games/cataclysm-dda/default.nix+10−4 pkgs/games/cataclysm-dda/git.nix+9−4 pkgs/top-level/all-packages.nix+6−2
pkgs/games/cataclysm-dda/default.nix+10−4
@@ -1,5 +1,5 @@
11{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
2−SDL2_mixer, freetype, gettext }:
2+SDL2_mixer, freetype, gettext, Cocoa }:
33
44stdenv.mkDerivation rec {
55 version = "0.C";
@@ -14,7 +14,8 @@ stdenv.mkDerivation rec {
1414
1515 nativeBuildInputs = [ makeWrapper pkgconfig ];
1616
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 [ Cocoa ];
1819
1920 postPatch = ''
2021 patchShebangs .
@@ -26,7 +27,12 @@ stdenv.mkDerivation rec {
2627 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
2728 '';
2829
29− makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";
30+ makeFlags = [
31+ "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
32+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
33+ "NATIVE=osx CLANG=1"
34+ "OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above
35+ ];
3036
3137 postInstall = ''
3238 wrapProgram $out/bin/cataclysm-tiles \
@@ -64,6 +70,6 @@ stdenv.mkDerivation rec {
6470 homepage = http://en.cataclysmdda.com/;
6571 license = licenses.cc-by-sa-30;
6672 maintainers = [ maintainers.skeidel ];
67− platforms = platforms.linux;
73+ platforms = platforms.unix;
6874 };
6975}
pkgs/games/cataclysm-dda/git.nix+9−4
@@ -1,5 +1,5 @@
11{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
2−SDL2_mixer, freetype, gettext }:
2+SDL2_mixer, freetype, gettext, CoreFoundation, Cocoa }:
33
44stdenv.mkDerivation rec {
55 version = "2017-12-09";
@@ -14,7 +14,8 @@ stdenv.mkDerivation rec {
1414
1515 nativeBuildInputs = [ makeWrapper pkgconfig ];
1616
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 ];
1819
1920 postPatch = ''
2021 patchShebangs .
@@ -26,7 +27,11 @@ stdenv.mkDerivation rec {
2627 -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
2728 '';
2829
29− makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";
30+ makeFlags = [
31+ "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1"
32+ ] ++ stdenv.lib.optionals stdenv.isDarwin [
33+ "NATIVE=osx CLANG=1"
34+ ];
3035
3136 postInstall = ''
3237 wrapProgram $out/bin/cataclysm-tiles \
@@ -65,6 +70,6 @@ stdenv.mkDerivation rec {
6570 '';
6671 homepage = http://en.cataclysmdda.com/;
6772 license = licenses.cc-by-sa-30;
68− platforms = platforms.linux;
73+ platforms = platforms.unix;
6974 };
7075}
pkgs/top-level/all-packages.nix+6−2
@@ -18139,9 +18139,13 @@ with pkgs;
1813918139
1814018140 bzflag = callPackage ../games/bzflag { };
1814118141
18142− cataclysm-dda = callPackage ../games/cataclysm-dda { };
18142+ cataclysm-dda = callPackage ../games/cataclysm-dda {
18143+ inherit (darwin.apple_sdk.frameworks) Cocoa;
18144+ };
1814318145
18144− cataclysm-dda-git = callPackage ../games/cataclysm-dda/git.nix { };
18146+ cataclysm-dda-git = callPackage ../games/cataclysm-dda/git.nix {
18147+ inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa;
18148+ };
1814518149
1814618150 chessdb = callPackage ../games/chessdb { };
1814718151