From d6863de058d61a35bef6d6c9221171ed040fc075 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Tue, 7 Apr 2020 14:13:08 +0900 Subject: [PATCH 01/14] cataclysm-dda{,-git}: name -> pname and version --- pkgs/games/cataclysm-dda/common.nix | 2 ++ pkgs/games/cataclysm-dda/default.nix | 1 - pkgs/games/cataclysm-dda/git.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index f904a3c0f354..bf071d62c67f 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -13,6 +13,8 @@ let ++ optionals stdenv.isDarwin [ Cocoa ]; common = { + pname = "cataclysm-dda"; + nativeBuildInputs = [ pkgconfig ]; buildInputs = cursesDeps ++ optionals tiles tilesDeps; diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index c046b0d3a2d8..490e5a45ac0c 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -10,7 +10,6 @@ in stdenv.mkDerivation (common // rec { version = "0.E-2"; - name = "cataclysm-dda-${version}"; src = fetchFromCleverRaven { rev = version; diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 8e3c3e33994f..d7b4bf4bde1d 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -10,8 +10,8 @@ let in stdenv.mkDerivation (common // rec { + pname = common.pname + "-git"; version = "2019-11-22"; - name = "cataclysm-dda-git-${version}"; src = fetchFromCleverRaven { rev = "a6c8ece992bffeae3788425dd4b3b5871e66a9cd"; From bf71f12cb5e9868d8427160d0680fde48c2316c2 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Apr 2020 10:54:28 +0900 Subject: [PATCH 02/14] cataclysm-dda{,-git}: apply locale patch dynamically Each time src/translations.cpp is modified, we have to update the locale patch. Using sed to patch dynamically should be handy. --- pkgs/games/cataclysm-dda/common.nix | 5 +++++ pkgs/games/cataclysm-dda/default.nix | 2 -- pkgs/games/cataclysm-dda/git.nix | 5 ----- .../patches/fix_locale_dir.patch | 18 ----------------- .../patches/fix_locale_dir_git.patch | 20 ------------------- 5 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch delete mode 100644 pkgs/games/cataclysm-dda/patches/fix_locale_dir_git.patch diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index bf071d62c67f..48941bdb01f6 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -21,6 +21,11 @@ let postPatch = '' patchShebangs . + + # Locale patch required for Darwin builds, see: + # https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970 + sed -i src/translations.cpp \ + -e 's@#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))@#elif 1@' ''; makeFlags = [ diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index 490e5a45ac0c..ed3fe7fdfc7a 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -16,8 +16,6 @@ stdenv.mkDerivation (common // rec { sha256 = "15l6w6lxays7qmsv0ci2ry53asb9an9dh7l7fc13256k085qcg68"; }; - patches = [ ./patches/fix_locale_dir.patch ]; - meta = with stdenv.lib.maintainers; common.meta // { maintainers = common.meta.maintainers ++ [ skeidel ]; }; diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index d7b4bf4bde1d..8e803ed63dff 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -18,11 +18,6 @@ stdenv.mkDerivation (common // rec { sha256 = "0ww2q5gykxm802z1kffmnrfahjlx123j1gfszklpsv0b1fccm1ab"; }; - patches = [ - # Locale patch required for Darwin builds, see: https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970 - ./patches/fix_locale_dir_git.patch - ]; - makeFlags = common.makeFlags ++ [ "VERSION=git-${version}-${substring 0 8 src.rev}" ]; diff --git a/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch b/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch deleted file mode 100644 index 5bfff892d2af..000000000000 --- a/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/src/translations.cpp -+++ b/src/translations.cpp -@@ -212,14 +212,12 @@ void set_language() - auto env = getenv( "LANGUAGE" ); - locale_dir = std::string( PATH_INFO::base_path() + "lang/mo/" + ( env ? env : "none" ) + - "/LC_MESSAGES/cataclysm-dda.mo" ); --#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES))) -+#else - if( !PATH_INFO::base_path().empty() ) { - locale_dir = PATH_INFO::base_path() + "share/locale"; - } else { - locale_dir = "lang/mo"; - } --#else -- locale_dir = "lang/mo"; - #endif - - const char *locale_dir_char = locale_dir.c_str(); diff --git a/pkgs/games/cataclysm-dda/patches/fix_locale_dir_git.patch b/pkgs/games/cataclysm-dda/patches/fix_locale_dir_git.patch deleted file mode 100644 index 79b442ff5c99..000000000000 --- a/pkgs/games/cataclysm-dda/patches/fix_locale_dir_git.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/src/translations.cpp b/src/translations.cpp -index 067e2cd77d..5660d18b3d 100644 ---- a/src/translations.cpp -+++ b/src/translations.cpp -@@ -211,14 +211,12 @@ void set_language() - auto env = getenv( "LANGUAGE" ); - locale_dir = std::string( FILENAMES["base_path"] + "lang/mo/" + ( env ? env : "none" ) + - "/LC_MESSAGES/cataclysm-dda.mo" ); --#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES))) -+#else - if( !FILENAMES["base_path"].empty() ) { - locale_dir = FILENAMES["base_path"] + "share/locale"; - } else { - locale_dir = "lang/mo"; - } --#else -- locale_dir = "lang/mo"; - #endif - - const char *locale_dir_char = locale_dir.c_str(); From ac8555486fe9f6c6d346192096b474d3b6a1f5a2 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Apr 2020 10:46:57 +0900 Subject: [PATCH 03/14] cataclysmDDA: add very basic framework for packaging mods Add new namespace 'cataclysmDDA', in which package builders, games, and mods are listed. --- pkgs/games/cataclysm-dda/builder.nix | 49 ++++++++++++++++++++ pkgs/games/cataclysm-dda/common.nix | 18 ++++---- pkgs/games/cataclysm-dda/default.nix | 56 +++++++++++++++-------- pkgs/games/cataclysm-dda/git.nix | 51 ++++++++++++--------- pkgs/games/cataclysm-dda/lib.nix | 17 +++++++ pkgs/games/cataclysm-dda/pkgs/default.nix | 24 ++++++++++ pkgs/games/cataclysm-dda/stable.nix | 32 +++++++++++++ pkgs/games/cataclysm-dda/wrapper.nix | 32 +++++++++++++ pkgs/top-level/all-packages.nix | 10 ++-- 9 files changed, 234 insertions(+), 55 deletions(-) create mode 100644 pkgs/games/cataclysm-dda/builder.nix create mode 100644 pkgs/games/cataclysm-dda/lib.nix create mode 100644 pkgs/games/cataclysm-dda/pkgs/default.nix create mode 100644 pkgs/games/cataclysm-dda/stable.nix create mode 100644 pkgs/games/cataclysm-dda/wrapper.nix diff --git a/pkgs/games/cataclysm-dda/builder.nix b/pkgs/games/cataclysm-dda/builder.nix new file mode 100644 index 000000000000..24128875f3a1 --- /dev/null +++ b/pkgs/games/cataclysm-dda/builder.nix @@ -0,0 +1,49 @@ +{ stdenvNoCC, lib, type }: + +assert lib.elem type [ + "mod" + "soundpack" + "tileset" +]; + +{ modName, version, src, ... } @ args: + +stdenvNoCC.mkDerivation (args // rec { + pname = args.pname or "cataclysm-dda-${type}-${modName}"; + + modRoot = args.modRoot or "."; + + configurePhase = args.configurePhase or '' + runHook preConfigure + runHook postConfigure + ''; + + buildPhase = args.buildPhase or '' + runHook preBuild + runHook postBuild + ''; + + checkPhase = args.checkPhase or '' + runHook preCheck + runHook postCheck + ''; + + installPhase = let + baseDir = { + mod = "mods"; + soundpack = "sound"; + tileset = "gfx"; + }.${type}; + in args.installPhase or '' + runHook preInstall + destdir="$out/share/cataclysm-dda/${baseDir}" + mkdir -p "$destdir" + cp -R "${modRoot}" "$destdir/${modName}" + runHook postInstall + ''; + + passthru = { + forTiles = true; + forCurses = type == "mod"; + }; +}) diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index 48941bdb01f6..3cbda9479070 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, gettext, ncurses, CoreFoundation +{ stdenv, pkgconfig, gettext, ncurses, CoreFoundation , tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa , debug, runtimeShell }: @@ -12,7 +12,7 @@ let tilesDeps = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf freetype ] ++ optionals stdenv.isDarwin [ Cocoa ]; - common = { + common = stdenv.mkDerivation { pname = "cataclysm-dda"; nativeBuildInputs = [ pkgconfig ]; @@ -51,6 +51,11 @@ let # make: *** [Makefile:687: obj/tiles/weather_data.o] Error 1 enableParallelBuilding = false; + passthru = { + isTiles = tiles; + isCurses = !tiles; + }; + meta = with stdenv.lib; { description = "A free, post apocalyptic, zombie infested rogue-like"; longDescription = '' @@ -84,13 +89,6 @@ let }; utils = { - fetchFromCleverRaven = { rev, sha256 }: - fetchFromGitHub { - owner = "CleverRaven"; - repo = "Cataclysm-DDA"; - inherit rev sha256; - }; - installXDGAppLauncher = '' launcher="$out/share/applications/cataclysm-dda.desktop" install -D -m 444 data/xdg/*cataclysm-dda.desktop -T "$launcher" @@ -113,4 +111,4 @@ let }; in -{ inherit common utils; } +common diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index ed3fe7fdfc7a..ada212ea7e9f 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -1,22 +1,42 @@ -{ stdenv, callPackage, CoreFoundation -, tiles ? true, Cocoa -, debug ? false -}: +{ newScope, darwin }: let - inherit (callPackage ./common.nix { inherit tiles CoreFoundation Cocoa debug; }) common utils; - inherit (utils) fetchFromCleverRaven; + callPackage = newScope self; + + stable = rec { + tiles = callPackage ./stable.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa; + }; + + curses = tiles.override { tiles = false; }; + }; + + git = rec { + tiles = callPackage ./git.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa; + }; + + curses = tiles.override { tiles = false; }; + }; + + lib = callPackage ./lib.nix {}; + + pkgs = callPackage ./pkgs {}; + + self = { + inherit + callPackage + stable + git; + + inherit (lib) + buildMod + buildSoundPack + buildTileSet + wrapCDDA; + + inherit pkgs; + }; in -stdenv.mkDerivation (common // rec { - version = "0.E-2"; - - src = fetchFromCleverRaven { - rev = version; - sha256 = "15l6w6lxays7qmsv0ci2ry53asb9an9dh7l7fc13256k085qcg68"; - }; - - meta = with stdenv.lib.maintainers; common.meta // { - maintainers = common.meta.maintainers ++ [ skeidel ]; - }; -}) +self diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 8e803ed63dff..89af582b3c07 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -1,28 +1,37 @@ -{ stdenv, callPackage, CoreFoundation +{ lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA , tiles ? true, Cocoa , debug ? false }: let - inherit (stdenv.lib) substring; - inherit (callPackage ./common.nix { inherit tiles CoreFoundation Cocoa debug; }) common utils; - inherit (utils) fetchFromCleverRaven; + common = callPackage ./common.nix { + inherit tiles CoreFoundation Cocoa debug; + }; + + self = common.overrideAttrs (common: rec { + pname = common.pname + "-git"; + version = "2019-11-22"; + + src = fetchFromGitHub { + owner = "CleverRaven"; + repo = "Cataclysm-DDA"; + rev = "a6c8ece992bffeae3788425dd4b3b5871e66a9cd"; + sha256 = "0ww2q5gykxm802z1kffmnrfahjlx123j1gfszklpsv0b1fccm1ab"; + }; + + makeFlags = common.makeFlags ++ [ + "VERSION=git-${version}-${lib.substring 0 8 src.rev}" + ]; + + passthru = common.passthru // { + pkgs = pkgs.override { build = self; }; + withMods = wrapCDDA self; + }; + + meta = with lib.maintainers; common.meta // { + maintainers = common.meta.maintainers ++ [ rardiol ]; + }; + }); in -stdenv.mkDerivation (common // rec { - pname = common.pname + "-git"; - version = "2019-11-22"; - - src = fetchFromCleverRaven { - rev = "a6c8ece992bffeae3788425dd4b3b5871e66a9cd"; - sha256 = "0ww2q5gykxm802z1kffmnrfahjlx123j1gfszklpsv0b1fccm1ab"; - }; - - makeFlags = common.makeFlags ++ [ - "VERSION=git-${version}-${substring 0 8 src.rev}" - ]; - - meta = with stdenv.lib.maintainers; common.meta // { - maintainers = common.meta.maintainers ++ [ rardiol ]; - }; -}) +self diff --git a/pkgs/games/cataclysm-dda/lib.nix b/pkgs/games/cataclysm-dda/lib.nix new file mode 100644 index 000000000000..02678ed0228e --- /dev/null +++ b/pkgs/games/cataclysm-dda/lib.nix @@ -0,0 +1,17 @@ +{ callPackage }: + +{ + buildMod = callPackage ./builder.nix { + type = "mod"; + }; + + buildSoundPack = callPackage ./builder.nix { + type = "soundpack"; + }; + + buildTileSet = callPackage ./builder.nix { + type = "tileset"; + }; + + wrapCDDA = callPackage ./wrapper.nix {}; +} diff --git a/pkgs/games/cataclysm-dda/pkgs/default.nix b/pkgs/games/cataclysm-dda/pkgs/default.nix new file mode 100644 index 000000000000..fb5571243f53 --- /dev/null +++ b/pkgs/games/cataclysm-dda/pkgs/default.nix @@ -0,0 +1,24 @@ +{ lib, callPackage, build ? null }: + +let + pkgs = { + mod = { + }; + + soundpack = { + }; + + tileset = { + }; + }; + + availableForBuild = _: mod: + if isNull build then + true + else if build.isTiles then + mod.forTiles + else + mod.forCurses; +in + +lib.mapAttrs (_: mod: lib.filterAttrs availableForBuild mod) pkgs diff --git a/pkgs/games/cataclysm-dda/stable.nix b/pkgs/games/cataclysm-dda/stable.nix new file mode 100644 index 000000000000..e142f67d190a --- /dev/null +++ b/pkgs/games/cataclysm-dda/stable.nix @@ -0,0 +1,32 @@ +{ lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA +, tiles ? true, Cocoa +, debug ? false +}: + +let + common = callPackage ./common.nix { + inherit tiles CoreFoundation Cocoa debug; + }; + + self = common.overrideAttrs (common: rec { + version = "0.E-2"; + + src = fetchFromGitHub { + owner = "CleverRaven"; + repo = "Cataclysm-DDA"; + rev = version; + sha256 = "15l6w6lxays7qmsv0ci2ry53asb9an9dh7l7fc13256k085qcg68"; + }; + + passthru = common.passthru // { + pkgs = pkgs.override { build = self; }; + withMods = wrapCDDA self; + }; + + meta = with lib.maintainers; common.meta // { + maintainers = common.meta.maintainers ++ [ skeidel ]; + }; + }); +in + +self diff --git a/pkgs/games/cataclysm-dda/wrapper.nix b/pkgs/games/cataclysm-dda/wrapper.nix new file mode 100644 index 000000000000..0a3727c2c1c1 --- /dev/null +++ b/pkgs/games/cataclysm-dda/wrapper.nix @@ -0,0 +1,32 @@ +{ lib, symlinkJoin, makeWrapper }: + +unwrapped: + +pkgsSpec: + +let + mods = if lib.isFunction pkgsSpec + then pkgsSpec unwrapped.pkgs + else pkgsSpec; +in + +if builtins.length mods == 0 +then unwrapped +else symlinkJoin { + name = unwrapped.name + "-with-mods"; + + paths = [ unwrapped ] ++ mods; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + if [ -x $out/bin/cataclysm ]; then + wrapProgram $out/bin/cataclysm \ + --add-flags "--datadir $out/share/cataclysm-dda/" + fi + if [ -x $out/bin/cataclysm-tiles ]; then + wrapProgram $out/bin/cataclysm-tiles \ + --add-flags "--datadir $out/share/cataclysm-dda/" + fi + ''; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8587ee041891..ae50c1729420 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23864,13 +23864,11 @@ in inherit (darwin.apple_sdk.frameworks) Carbon CoreServices; }; - cataclysm-dda = callPackage ../games/cataclysm-dda { - inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa; - }; + cataclysmDDA = callPackage ../games/cataclysm-dda { }; - cataclysm-dda-git = callPackage ../games/cataclysm-dda/git.nix { - inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa; - }; + cataclysm-dda = cataclysmDDA.stable.tiles; + + cataclysm-dda-git = cataclysmDDA.git.tiles; chessdb = callPackage ../games/chessdb { }; From bc88844e68ce9fb0456bbf73d66bf748a9f0be36 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Apr 2020 21:24:46 +0900 Subject: [PATCH 04/14] cataclysmDDA: add UndeadPeople tileset --- pkgs/games/cataclysm-dda/pkgs/default.nix | 1 + .../pkgs/tilesets/UndeadPeople/default.nix | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix diff --git a/pkgs/games/cataclysm-dda/pkgs/default.nix b/pkgs/games/cataclysm-dda/pkgs/default.nix index fb5571243f53..ee3f1b0f278d 100644 --- a/pkgs/games/cataclysm-dda/pkgs/default.nix +++ b/pkgs/games/cataclysm-dda/pkgs/default.nix @@ -9,6 +9,7 @@ let }; tileset = { + UndeadPeople = callPackage ./tilesets/UndeadPeople {}; }; }; diff --git a/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix b/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix new file mode 100644 index 000000000000..4b115636d5f7 --- /dev/null +++ b/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix @@ -0,0 +1,23 @@ +{ lib, buildTileSet, fetchFromGitHub }: + +buildTileSet { + modName = "UndeadPeople"; + version = "2020-04-07"; + + src = fetchFromGitHub { + owner = "SomeDeadGuy"; + repo = "UndeadPeopleTileset"; + rev = "6686230b35b712612b3c7573349740b6f7968ff9"; + sha256 = "02higdazd7v2gci5lr8r7fhc6yr2az6gbvksgz0lrgh1wg8xgqgs"; + }; + + modRoot = "MSX++UnDeadPeopleEdition"; + + meta = with lib; { + description = "Cataclysm DDA tileset based on MSX++ tileset"; + homepage = "https://github.com/SomeDeadGuy/UndeadPeopleTileset"; + license = licenses.unfree; + maintainers = with maintainers; [ mnacamura ]; + platforms = platforms.all; + }; +} From 90c265275f2b0d65ce2af5710de421972cc6c1b8 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Apr 2020 14:10:35 +0900 Subject: [PATCH 05/14] cataclysmDDA: make pkgs extensible Example: let customMods = self: super: lib.recursiveUpdate super { soundpack.AwesomeSounds = cataclysmDDA.buildSoundPack { ... }; }; in cataclysm-dda.withMods (mods: with mods.extend customMods; [ tileset.UndeadPeople soundpack.AwesomeSounds ]) --- pkgs/games/cataclysm-dda/pkgs/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/games/cataclysm-dda/pkgs/default.nix b/pkgs/games/cataclysm-dda/pkgs/default.nix index ee3f1b0f278d..6f3df09a7861 100644 --- a/pkgs/games/cataclysm-dda/pkgs/default.nix +++ b/pkgs/games/cataclysm-dda/pkgs/default.nix @@ -13,6 +13,8 @@ let }; }; + pkgs' = lib.mapAttrs (_: mod: lib.filterAttrs availableForBuild mod) pkgs; + availableForBuild = _: mod: if isNull build then true @@ -22,4 +24,4 @@ let mod.forCurses; in -lib.mapAttrs (_: mod: lib.filterAttrs availableForBuild mod) pkgs +lib.makeExtensible (_: pkgs') From de56294e578096f6daba3cff214af5d23ac8865e Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 9 Apr 2020 16:11:51 +0900 Subject: [PATCH 06/14] cataclysm-dda{,-git}: clean up --- pkgs/games/cataclysm-dda/common.nix | 194 ++++++++++++++-------------- pkgs/games/cataclysm-dda/git.nix | 7 +- pkgs/games/cataclysm-dda/stable.nix | 7 +- 3 files changed, 103 insertions(+), 105 deletions(-) diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index 3cbda9479070..6948db097ae2 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -1,6 +1,6 @@ -{ stdenv, pkgconfig, gettext, ncurses, CoreFoundation +{ stdenv, runtimeShell, pkgconfig, gettext, ncurses, CoreFoundation , tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa -, debug, runtimeShell +, debug }: let @@ -12,103 +12,99 @@ let tilesDeps = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf freetype ] ++ optionals stdenv.isDarwin [ Cocoa ]; - common = stdenv.mkDerivation { - pname = "cataclysm-dda"; + installXDGAppLauncher = '' + launcher="$out/share/applications/cataclysm-dda.desktop" + install -D -m 444 data/xdg/*cataclysm-dda.desktop -T "$launcher" + sed -i "$launcher" -e "s,\(Exec=\)\(cataclysm-tiles\),\1$out/bin/\2," + install -D -m 444 data/xdg/cataclysm-dda.svg -t $out/share/icons/hicolor/scalable/apps + ''; - nativeBuildInputs = [ pkgconfig ]; - - buildInputs = cursesDeps ++ optionals tiles tilesDeps; - - postPatch = '' - patchShebangs . - - # Locale patch required for Darwin builds, see: - # https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970 - sed -i src/translations.cpp \ - -e 's@#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))@#elif 1@' - ''; - - makeFlags = [ - "PREFIX=$(out)" "USE_HOME_DIR=1" "LANGUAGES=all" - ] ++ optionals (!debug) [ - "RELEASE=1" - ] ++ optionals tiles [ - "TILES=1" "SOUND=1" - ] ++ optionals stdenv.isDarwin [ - "NATIVE=osx" "CLANG=1" - ]; - - postInstall = optionalString tiles - ( if !stdenv.isDarwin - then utils.installXDGAppLauncher - else utils.installMacOSAppLauncher - ); - - dontStrip = debug; - - # https://hydra.nixos.org/build/65193254 - # src/weather_data.cpp:203:1: fatal error: opening dependency file obj/tiles/weather_data.d: No such file or directory - # make: *** [Makefile:687: obj/tiles/weather_data.o] Error 1 - enableParallelBuilding = false; - - passthru = { - isTiles = tiles; - isCurses = !tiles; - }; - - meta = with stdenv.lib; { - description = "A free, post apocalyptic, zombie infested rogue-like"; - longDescription = '' - Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. - Surviving is difficult: you have been thrown, ill-equipped, into a - landscape now riddled with monstrosities of which flesh eating zombies are - neither the strangest nor the deadliest. - - Yet with care and a little luck, many things are possible. You may try to - eke out an existence in the forests silently executing threats and - providing sustenance with your longbow. You can ride into town in a - jerry-rigged vehicle, all guns blazing, to settle matters in a fug of - smoke from your molotovs. You could take a more measured approach and - construct an impregnable fortress, surrounded by traps to protect you from - the horrors without. The longer you survive, the more skilled and adapted - you will get and the better equipped and armed to deal with the threats - you are presented with. - - In the course of your ordeal there will be opportunities and temptations - to improve or change your very nature. There are tales of survivors fitted - with extraordinary cybernetics giving great power and stories too of - gravely mutated survivors who, warped by their ingestion of exotic - substances or radiation, now more closely resemble insects, birds or fish - than their original form. - ''; - homepage = "https://cataclysmdda.org/"; - license = licenses.cc-by-sa-30; - maintainers = with maintainers; [ mnacamura ]; - platforms = platforms.unix; - }; - }; - - utils = { - installXDGAppLauncher = '' - launcher="$out/share/applications/cataclysm-dda.desktop" - install -D -m 444 data/xdg/*cataclysm-dda.desktop -T "$launcher" - sed -i "$launcher" -e "s,\(Exec=\)\(cataclysm-tiles\),\1$out/bin/\2," - install -D -m 444 data/xdg/cataclysm-dda.svg -t $out/share/icons/hicolor/scalable/apps - ''; - - installMacOSAppLauncher = '' - app=$out/Applications/Cataclysm.app - install -D -m 444 data/osx/Info.plist -t $app/Contents - install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources - mkdir $app/Contents/MacOS - launcher=$app/Contents/MacOS/Cataclysm.sh - cat << EOF > $launcher - #!${runtimeShell} - $out/bin/cataclysm-tiles - EOF - chmod 555 $launcher - ''; - }; + installMacOSAppLauncher = '' + app=$out/Applications/Cataclysm.app + install -D -m 444 data/osx/Info.plist -t $app/Contents + install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources + mkdir $app/Contents/MacOS + launcher=$app/Contents/MacOS/Cataclysm.sh + cat << EOF > $launcher + #!${runtimeShell} + $out/bin/cataclysm-tiles + EOF + chmod 555 $launcher + ''; in -common +stdenv.mkDerivation { + pname = "cataclysm-dda"; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = cursesDeps ++ optionals tiles tilesDeps; + + postPatch = '' + patchShebangs . + + # Locale patch required for Darwin builds, see: + # https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970 + sed -i src/translations.cpp \ + -e 's@#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))@#elif 1@' + ''; + + makeFlags = [ + "PREFIX=$(out)" "USE_HOME_DIR=1" "LANGUAGES=all" + ] ++ optionals (!debug) [ + "RELEASE=1" + ] ++ optionals tiles [ + "TILES=1" "SOUND=1" + ] ++ optionals stdenv.isDarwin [ + "NATIVE=osx" "CLANG=1" + ]; + + postInstall = optionalString tiles + ( if !stdenv.isDarwin + then installXDGAppLauncher + else installMacOSAppLauncher + ); + + dontStrip = debug; + + # https://hydra.nixos.org/build/65193254 + # src/weather_data.cpp:203:1: fatal error: opening dependency file obj/tiles/weather_data.d: No such file or directory + # make: *** [Makefile:687: obj/tiles/weather_data.o] Error 1 + enableParallelBuilding = false; + + passthru = { + isTiles = tiles; + isCurses = !tiles; + }; + + meta = with stdenv.lib; { + description = "A free, post apocalyptic, zombie infested rogue-like"; + longDescription = '' + Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world. + Surviving is difficult: you have been thrown, ill-equipped, into a + landscape now riddled with monstrosities of which flesh eating zombies are + neither the strangest nor the deadliest. + + Yet with care and a little luck, many things are possible. You may try to + eke out an existence in the forests silently executing threats and + providing sustenance with your longbow. You can ride into town in a + jerry-rigged vehicle, all guns blazing, to settle matters in a fug of + smoke from your molotovs. You could take a more measured approach and + construct an impregnable fortress, surrounded by traps to protect you from + the horrors without. The longer you survive, the more skilled and adapted + you will get and the better equipped and armed to deal with the threats + you are presented with. + + In the course of your ordeal there will be opportunities and temptations + to improve or change your very nature. There are tales of survivors fitted + with extraordinary cybernetics giving great power and stories too of + gravely mutated survivors who, warped by their ingestion of exotic + substances or radiation, now more closely resemble insects, birds or fish + than their original form. + ''; + homepage = "https://cataclysmdda.org/"; + license = licenses.cc-by-sa-30; + maintainers = with maintainers; [ mnacamura ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 89af582b3c07..7b9228350049 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -5,7 +5,7 @@ let common = callPackage ./common.nix { - inherit tiles CoreFoundation Cocoa debug; + inherit CoreFoundation tiles Cocoa debug; }; self = common.overrideAttrs (common: rec { @@ -28,8 +28,9 @@ let withMods = wrapCDDA self; }; - meta = with lib.maintainers; common.meta // { - maintainers = common.meta.maintainers ++ [ rardiol ]; + meta = common.meta // { + maintainers = with lib.maintainers; + common.meta.maintainers ++ [ rardiol ]; }; }); in diff --git a/pkgs/games/cataclysm-dda/stable.nix b/pkgs/games/cataclysm-dda/stable.nix index e142f67d190a..4176083b861c 100644 --- a/pkgs/games/cataclysm-dda/stable.nix +++ b/pkgs/games/cataclysm-dda/stable.nix @@ -5,7 +5,7 @@ let common = callPackage ./common.nix { - inherit tiles CoreFoundation Cocoa debug; + inherit CoreFoundation tiles Cocoa debug; }; self = common.overrideAttrs (common: rec { @@ -23,8 +23,9 @@ let withMods = wrapCDDA self; }; - meta = with lib.maintainers; common.meta // { - maintainers = common.meta.maintainers ++ [ skeidel ]; + meta = common.meta // { + maintainers = with lib.maintainers; + common.meta.maintainers ++ [ skeidel ]; }; }); in From ecf7b57e1221e72522d4c5bb1e39f63449b72582 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 9 Apr 2020 17:16:25 +0900 Subject: [PATCH 07/14] cataclysm-dda{,-git}: support build with USE_XDG_DIR flag --- pkgs/games/cataclysm-dda/common.nix | 4 +++- pkgs/games/cataclysm-dda/git.nix | 3 ++- pkgs/games/cataclysm-dda/stable.nix | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index 6948db097ae2..9ec73cdebe03 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -1,6 +1,7 @@ { stdenv, runtimeShell, pkgconfig, gettext, ncurses, CoreFoundation , tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa , debug +, useXdgDir }: let @@ -50,7 +51,8 @@ stdenv.mkDerivation { ''; makeFlags = [ - "PREFIX=$(out)" "USE_HOME_DIR=1" "LANGUAGES=all" + "PREFIX=$(out)" "LANGUAGES=all" + (if useXdgDir then "USE_XDG_DIR=1" else "USE_HOME_DIR=1") ] ++ optionals (!debug) [ "RELEASE=1" ] ++ optionals tiles [ diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 7b9228350049..1113fe116dcc 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -1,11 +1,12 @@ { lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA , tiles ? true, Cocoa , debug ? false +, useXdgDir ? false }: let common = callPackage ./common.nix { - inherit CoreFoundation tiles Cocoa debug; + inherit CoreFoundation tiles Cocoa debug useXdgDir; }; self = common.overrideAttrs (common: rec { diff --git a/pkgs/games/cataclysm-dda/stable.nix b/pkgs/games/cataclysm-dda/stable.nix index 4176083b861c..076a33a9e899 100644 --- a/pkgs/games/cataclysm-dda/stable.nix +++ b/pkgs/games/cataclysm-dda/stable.nix @@ -1,11 +1,12 @@ { lib, callPackage, CoreFoundation, fetchFromGitHub, pkgs, wrapCDDA , tiles ? true, Cocoa , debug ? false +, useXdgDir ? false }: let common = callPackage ./common.nix { - inherit CoreFoundation tiles Cocoa debug; + inherit CoreFoundation tiles Cocoa debug useXdgDir; }; self = common.overrideAttrs (common: rec { From 633f21111314ac3ee34d9103e72f7de08cd12daf Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Fri, 10 Apr 2020 09:30:33 +0900 Subject: [PATCH 08/14] cataclysm-dda-git: make it overridable with git revision 'cataclysm-dda-git.overrideAttrs (_: { version = ...; src = fetchFromGitHub { ... }; })' did not update VERSION make flag correctly. With this change, one can override 'cataclysm-dda-git' correctly and more easily: cataclysm-dda-git.override { version = ...; rev = ...; sha256 = ...; } --- pkgs/games/cataclysm-dda/git.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 1113fe116dcc..36f37f7aeba4 100644 --- a/pkgs/games/cataclysm-dda/git.nix +++ b/pkgs/games/cataclysm-dda/git.nix @@ -2,6 +2,9 @@ , tiles ? true, Cocoa , debug ? false , useXdgDir ? false +, version ? "2019-11-22" +, rev ? "a6c8ece992bffeae3788425dd4b3b5871e66a9cd" +, sha256 ? "0ww2q5gykxm802z1kffmnrfahjlx123j1gfszklpsv0b1fccm1ab" }: let @@ -11,13 +14,12 @@ let self = common.overrideAttrs (common: rec { pname = common.pname + "-git"; - version = "2019-11-22"; + inherit version; src = fetchFromGitHub { owner = "CleverRaven"; repo = "Cataclysm-DDA"; - rev = "a6c8ece992bffeae3788425dd4b3b5871e66a9cd"; - sha256 = "0ww2q5gykxm802z1kffmnrfahjlx123j1gfszklpsv0b1fccm1ab"; + inherit rev sha256; }; makeFlags = common.makeFlags ++ [ From d472eed4b570f9392aad7a4f2a1bdbf2b5fd5bf8 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 9 Apr 2020 19:53:02 +0900 Subject: [PATCH 09/14] cataclysmDDA: add README --- pkgs/games/cataclysm-dda/README.md | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 pkgs/games/cataclysm-dda/README.md diff --git a/pkgs/games/cataclysm-dda/README.md b/pkgs/games/cataclysm-dda/README.md new file mode 100644 index 000000000000..e8fe17a2661a --- /dev/null +++ b/pkgs/games/cataclysm-dda/README.md @@ -0,0 +1,83 @@ +# Cataclysm: Dark Days Ahead + +## Installation + +To install the latest stable release of Cataclysm DDA, run +`nix-env -f "" -iA cataclysm-dda`. +For the curses build (build without tiles), install `cataclysmDDA.stable.curses`. +Note: `cataclysm-dda` is an alias to `cataclysmDDA.stable.tiles`. + +If you like access to a development build of your favorite git revision, override +`cataclysm-dda-git` (or `cataclysmDDA.git.curses` if you like no tiles): + +```nix +cataclysm-dda-git.override { + version = "YYYY-MM-DD"; + rev = "YOUR_FAVORITE_REVISION"; + sha256 = "CHECKSUM_OF_THE_REVISION"; +} +``` + +The sha256 checksum can be obtained by + +```sh +nix-prefetch-url --unpack "https://github.com/CleverRaven/Cataclysm-DDA/archive/${YOUR_FAVORITE_REVISION}.tar.gz" +``` + +## Customizing with mods + +To install the game with mods of your choice, you can use `withMods` attribute: + +```nix +cataclysm-dda.withMods (mods: with mods; [ + tileset.UndeadPeople +]) +``` + +All mods, soundpacks, and tilesets available in nixpkgs are found in +`cataclysmDDA.pkgs`. + +To modify existing mods and/or add more mods not available in nixpkgs, you can +do it like this way: + +```nix +let + customMods = self: super: lib.recursiveUpdate super { + # Modify existing mod + tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: { + # If you like to apply a patch to the tileset for example + patches = [ ./path/to/your.patch ]; + }); + + # Add another mod + mod.Awesome = cataclysmDDA.buildMod { + modName = "Awesome"; + version = "0.x"; + src = fetchFromGitHub { + owner = "Someone"; + repo = "AwesomeMod"; + rev = "..."; + sha256 = "..."; + }; + # Path to be installed in the unpacked source (default: ".") + modRoot = "contents/under/this/path/will/be/installed"; + }; + + # Add another soundpack + soundpack.Fantastic = cataclysmDDA.buildSoundPack { + # ditto + }; + + # Add another tileset + tileset.SuperDuper = cataclysmDDA.buildTileSet { + # ditto + }; + }; +in +cataclysm-dda.withMods (mods: with mods.extend customMods; [ + tileset.UndeadPeople + mod.Awesome + soundpack.Fantastic + tileset.SuperDuper +]) +``` From bbe7b86eea5cbdf119fcf5ffd82b7ad78c1f60c4 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 23 Apr 2020 19:22:58 +0900 Subject: [PATCH 10/14] cataclysmDDA: launch the wrapped program --- pkgs/games/cataclysm-dda/wrapper.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/games/cataclysm-dda/wrapper.nix b/pkgs/games/cataclysm-dda/wrapper.nix index 0a3727c2c1c1..a73c320f9c67 100644 --- a/pkgs/games/cataclysm-dda/wrapper.nix +++ b/pkgs/games/cataclysm-dda/wrapper.nix @@ -28,5 +28,20 @@ else symlinkJoin { wrapProgram $out/bin/cataclysm-tiles \ --add-flags "--datadir $out/share/cataclysm-dda/" fi + + # Launch the wrapped program + replaceProgram() { + cp "$1" "''${1}.bk" + unlink "$1" + mv "''${1}.bk" "$1" + sed -i "$1" -e "s,/nix/store/.\+\(/bin/cataclysm-tiles\),$out\1," + } + for script in "$out/share/applications/cataclysm-dda.desktop" \ + "$out/Applications/Cataclysm.app/Contents/MacOS/Cataclysm.sh" + do + if [ -e "$script" ]; then + replaceProgram "$script" + fi + done ''; } From fbf4b4f5ed4ea0adc22fb7a4a7b71a49154b3bcb Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Jul 2020 11:44:11 +0900 Subject: [PATCH 11/14] cataclysmDDA: update README Add description about `useXdgDir` flag --- pkgs/games/cataclysm-dda/README.md | 31 ++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/games/cataclysm-dda/README.md b/pkgs/games/cataclysm-dda/README.md index e8fe17a2661a..ae2ee56a010e 100644 --- a/pkgs/games/cataclysm-dda/README.md +++ b/pkgs/games/cataclysm-dda/README.md @@ -1,14 +1,15 @@ # Cataclysm: Dark Days Ahead -## Installation +## How to install Cataclysm DDA -To install the latest stable release of Cataclysm DDA, run -`nix-env -f "" -iA cataclysm-dda`. -For the curses build (build without tiles), install `cataclysmDDA.stable.curses`. -Note: `cataclysm-dda` is an alias to `cataclysmDDA.stable.tiles`. +To install the latest stable release of Cataclysm DDA to your profile, execute +`nix-env -f "" -iA cataclysm-dda`. For the curses build (build +without tiles), install `cataclysmDDA.stable.curses`. Note: `cataclysm-dda` is +an alias to `cataclysmDDA.stable.tiles`. -If you like access to a development build of your favorite git revision, override -`cataclysm-dda-git` (or `cataclysmDDA.git.curses` if you like no tiles): +If you like access to a development build of your favorite git revision, +override `cataclysm-dda-git` (or `cataclysmDDA.git.curses` if you like curses +build): ```nix cataclysm-dda-git.override { @@ -24,9 +25,19 @@ The sha256 checksum can be obtained by nix-prefetch-url --unpack "https://github.com/CleverRaven/Cataclysm-DDA/archive/${YOUR_FAVORITE_REVISION}.tar.gz" ``` +The default configuration directory is `~/.cataclysm-dda`. If you prefer +`$XDG_CONFIG_HOME/cataclysm-dda`, override the derivation: + +```nix +cataclysm-dda.override { + useXdgDir = true; +} +``` + ## Customizing with mods -To install the game with mods of your choice, you can use `withMods` attribute: +To install Cataclysm DDA with mods of your choice, you can use `withMods` +attribute: ```nix cataclysm-dda.withMods (mods: with mods; [ @@ -37,8 +48,8 @@ cataclysm-dda.withMods (mods: with mods; [ All mods, soundpacks, and tilesets available in nixpkgs are found in `cataclysmDDA.pkgs`. -To modify existing mods and/or add more mods not available in nixpkgs, you can -do it like this way: +Here is an example to modify existing mods and/or add more mods not available +in nixpkgs: ```nix let From cf0e2d51ac42452c55e288efc846e51eeae22323 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Jul 2020 10:17:23 +0900 Subject: [PATCH 12/14] cataclysmDDA: update mods --- .../cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix b/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix index 4b115636d5f7..7a58cea82081 100644 --- a/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix +++ b/pkgs/games/cataclysm-dda/pkgs/tilesets/UndeadPeople/default.nix @@ -2,13 +2,13 @@ buildTileSet { modName = "UndeadPeople"; - version = "2020-04-07"; + version = "2020-07-08"; src = fetchFromGitHub { owner = "SomeDeadGuy"; repo = "UndeadPeopleTileset"; - rev = "6686230b35b712612b3c7573349740b6f7968ff9"; - sha256 = "02higdazd7v2gci5lr8r7fhc6yr2az6gbvksgz0lrgh1wg8xgqgs"; + rev = "f7f13b850fafe2261deee051f45d9c611a661534"; + sha256 = "0r06srjr7rq51jk9yfyxz80nfgb98mkn86cbcjfxpibgbqvcp0zm"; }; modRoot = "MSX++UnDeadPeopleEdition"; From c9c6f5f6937b8703092363488bb6fa6c59c255f8 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Jul 2020 15:16:08 +0900 Subject: [PATCH 13/14] doc: fix MD_TARGETS globstar (**) does not work in Makefile --- doc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index cdef493502bf..49f361ebb60b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,4 +1,4 @@ -MD_TARGETS=$(addsuffix .xml, $(basename $(wildcard ./*.md ./**/*.md))) +MD_TARGETS=$(addsuffix .xml, $(basename $(shell find . -type f -regex '.*\.md$$'))) .PHONY: all all: validate format out/html/index.html out/epub/manual.epub From f2b2347b2950e78e45216b05034cf074f75c4108 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Wed, 8 Jul 2020 11:26:23 +0900 Subject: [PATCH 14/14] doc: add section for cataclysm-dda --- .../README.md => doc/builders/packages/cataclysm-dda.section.md | 0 doc/builders/packages/index.xml | 1 + 2 files changed, 1 insertion(+) rename pkgs/games/cataclysm-dda/README.md => doc/builders/packages/cataclysm-dda.section.md (100%) diff --git a/pkgs/games/cataclysm-dda/README.md b/doc/builders/packages/cataclysm-dda.section.md similarity index 100% rename from pkgs/games/cataclysm-dda/README.md rename to doc/builders/packages/cataclysm-dda.section.md diff --git a/doc/builders/packages/index.xml b/doc/builders/packages/index.xml index 4e109bd1c599..e20b0c689a80 100644 --- a/doc/builders/packages/index.xml +++ b/doc/builders/packages/index.xml @@ -18,6 +18,7 @@ +