nixpkgs/pkgs/games/cataclysm-dda/default.nix

53 lines
1.5 KiB
Nix
Raw Normal View History

{ 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 22:04:44 +01:00
version = "0.C";
name = "cataclysm-dda-${version}";
src = fetchFromCleverRaven {
2015-08-06 22:04:44 +01:00
rev = "${version}";
sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
};
nativeBuildInputs = common.nativeBuildInputs
++ optionals (tiles && stdenv.isDarwin) [ libicns ];
patches = [ ./patches/fix_locale_dir.patch ];
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 [
"WARNINGS+=-Wno-deprecated-declarations"
"WARNINGS+=-Wno-ignored-attributes"
2018-02-06 15:01:15 +00:00
] ++ optionals stdenv.cc.isClang [
"WARNINGS+=-Wno-inconsistent-missing-override"
2018-01-21 15:01:17 +00:00
];
2015-08-06 22:04:44 +01:00
NIX_CFLAGS_COMPILE = optionalString stdenv.cc.isClang "-Wno-user-defined-warnings";
postBuild = optionalString (tiles && stdenv.isDarwin) ''
# iconutil on macOS is not available in nixpkgs
png2icns data/osx/AppIcon.icns data/osx/AppIcon.iconset/*
'';
postInstall = optionalString (tiles && stdenv.isDarwin)
installMacOSAppLauncher;
2015-08-06 22:04:44 +01:00
# Disable, possible problems with hydra
#enableParallelBuilding = true;
2015-08-06 22:04:44 +01:00
meta = with stdenv.lib.maintainers; common.meta // {
maintainers = common.meta.maintainers ++ [ skeidel ];
2015-08-06 22:04:44 +01:00
};
})