2018-07-05 16:47:43 +00:00
|
|
|
{ stdenv, callPackage, ncurses
|
|
|
|
, tiles ? true, Cocoa, libicns
|
|
|
|
, debug ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optionals optionalString;
|
|
|
|
inherit (callPackage ./common.nix { inherit tiles Cocoa debug; }) common utils;
|
|
|
|
inherit (utils) fetchFromCleverRaven installMacOSAppLauncher;
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation (common // rec {
|
2015-08-06 21:04:44 +00:00
|
|
|
version = "0.C";
|
|
|
|
name = "cataclysm-dda-${version}";
|
|
|
|
|
2018-07-05 16:47:43 +00:00
|
|
|
src = fetchFromCleverRaven {
|
2015-08-06 21:04:44 +00:00
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
|
|
|
|
};
|
|
|
|
|
2018-07-05 16:47:43 +00:00
|
|
|
nativeBuildInputs = common.nativeBuildInputs
|
|
|
|
++ optionals (tiles && stdenv.isDarwin) [ libicns ];
|
2016-03-23 00:05:50 +00:00
|
|
|
|
2018-01-22 10:45:12 +00:00
|
|
|
patches = [ ./patches/fix_locale_dir.patch ];
|
|
|
|
|
2018-07-05 16:47:43 +00:00
|
|
|
makeFlags = common.makeFlags
|
|
|
|
++ optionals stdenv.isDarwin [
|
2018-01-21 15:01:17 +00:00
|
|
|
"OSX_MIN=10.6" # SDL for macOS only supports deploying on 10.6 and above
|
2018-02-06 15:01:15 +00:00
|
|
|
] ++ optionals stdenv.cc.isGNU [
|
2018-01-26 12:42:20 +00:00
|
|
|
"WARNINGS+=-Wno-deprecated-declarations"
|
|
|
|
"WARNINGS+=-Wno-ignored-attributes"
|
2018-02-06 15:01:15 +00:00
|
|
|
] ++ optionals stdenv.cc.isClang [
|
2018-01-26 12:42:20 +00:00
|
|
|
"WARNINGS+=-Wno-inconsistent-missing-override"
|
2018-01-21 15:01:17 +00:00
|
|
|
];
|
2015-08-06 21:04:44 +00:00
|
|
|
|
2018-07-05 16:47:43 +00:00
|
|
|
NIX_CFLAGS_COMPILE = optionalString stdenv.cc.isClang "-Wno-user-defined-warnings";
|
2018-03-14 21:41:47 +00:00
|
|
|
|
2018-07-05 16:47:43 +00:00
|
|
|
postBuild = optionalString (tiles && stdenv.isDarwin) ''
|
2018-01-22 03:19:27 +00:00
|
|
|
# iconutil on macOS is not available in nixpkgs
|
|
|
|
png2icns data/osx/AppIcon.icns data/osx/AppIcon.iconset/*
|
|
|
|
'';
|
|
|
|
|
2018-07-05 16:47:43 +00:00
|
|
|
postInstall = optionalString (tiles && stdenv.isDarwin)
|
|
|
|
installMacOSAppLauncher;
|
2015-08-06 21:04:44 +00:00
|
|
|
|
2015-08-26 16:32:33 +00:00
|
|
|
# Disable, possible problems with hydra
|
|
|
|
#enableParallelBuilding = true;
|
2015-08-06 21:04:44 +00:00
|
|
|
|
2018-07-19 02:40:56 +00:00
|
|
|
meta = with stdenv.lib.maintainers; common.meta // {
|
|
|
|
maintainers = common.meta.maintainers ++ [ skeidel ];
|
2015-08-06 21:04:44 +00:00
|
|
|
};
|
2018-07-05 16:47:43 +00:00
|
|
|
})
|