diff options
author | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2020-04-08 14:10:35 +0900 |
---|---|---|
committer | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2020-07-18 14:23:22 +0900 |
commit | 90c265275f2b0d65ce2af5710de421972cc6c1b8 (patch) | |
tree | 59fb692d55c822ba6270bc9089df9224a40292a7 /pkgs/games/cataclysm-dda | |
parent | bc88844e68ce9fb0456bbf73d66bf748a9f0be36 (diff) |
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
])
Diffstat (limited to 'pkgs/games/cataclysm-dda')
-rw-r--r-- | pkgs/games/cataclysm-dda/pkgs/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
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') |