2019-05-02 17:29:07 +01:00
|
|
|
{ stdenv, callPackage, CoreFoundation
|
|
|
|
, tiles ? true, Cocoa
|
2018-07-05 17:47:43 +01:00
|
|
|
, debug ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (stdenv.lib) optionals optionalString;
|
|
|
|
inherit (callPackage ./common.nix { inherit tiles Cocoa debug; }) common utils;
|
2019-05-02 17:29:07 +01:00
|
|
|
inherit (utils) fetchFromCleverRaven installXDGAppLauncher installMacOSAppLauncher;
|
2018-07-05 17:47:43 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation (common // rec {
|
2019-05-02 17:29:07 +01:00
|
|
|
version = "0.D";
|
2015-08-06 22:04:44 +01:00
|
|
|
name = "cataclysm-dda-${version}";
|
|
|
|
|
2018-07-05 17:47:43 +01:00
|
|
|
src = fetchFromCleverRaven {
|
2015-08-06 22:04:44 +01:00
|
|
|
rev = "${version}";
|
2019-05-02 17:29:07 +01:00
|
|
|
sha256 = "00zzhx1mh1qjq668cga5nbrxp2qk6b82j5ak65skhgnlr6ii4ysc";
|
2015-08-06 22:04:44 +01:00
|
|
|
};
|
|
|
|
|
2019-05-02 17:29:07 +01:00
|
|
|
buildInputs = common.buildInputs
|
|
|
|
++ optionals stdenv.isDarwin [ CoreFoundation ];
|
2016-03-23 00:05:50 +00:00
|
|
|
|
2018-01-22 10:45:12 +00:00
|
|
|
patches = [ ./patches/fix_locale_dir.patch ];
|
|
|
|
|
2019-05-02 17:29:07 +01:00
|
|
|
postPatch = common.postPatch + ''
|
|
|
|
substituteInPlace lua/autoexec.lua --replace "/usr/share" "$out/share"
|
2018-01-22 03:19:27 +00:00
|
|
|
'';
|
|
|
|
|
2019-05-02 17:29:07 +01:00
|
|
|
postInstall = optionalString tiles
|
|
|
|
( if !stdenv.isDarwin
|
|
|
|
then installXDGAppLauncher
|
|
|
|
else installMacOSAppLauncher
|
|
|
|
);
|
2015-08-06 22:04:44 +01:00
|
|
|
|
2015-08-26 17:32:33 +01:00
|
|
|
# Disable, possible problems with hydra
|
|
|
|
#enableParallelBuilding = true;
|
2015-08-06 22:04:44 +01:00
|
|
|
|
2018-07-19 03:40:56 +01:00
|
|
|
meta = with stdenv.lib.maintainers; common.meta // {
|
|
|
|
maintainers = common.meta.maintainers ++ [ skeidel ];
|
2015-08-06 22:04:44 +01:00
|
|
|
};
|
2018-07-05 17:47:43 +01:00
|
|
|
})
|