Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ callPackage }:
|
|
|
|
rec {
|
|
buildMod = callPackage ./builder.nix {
|
|
type = "mod";
|
|
};
|
|
|
|
buildSoundPack = callPackage ./builder.nix {
|
|
type = "soundpack";
|
|
};
|
|
|
|
buildTileSet = callPackage ./builder.nix {
|
|
type = "tileset";
|
|
};
|
|
|
|
wrapCDDA = callPackage ./wrapper.nix { };
|
|
|
|
# Required to fix `pkgs` and `withMods` attrs after applying `overrideAttrs`.
|
|
#
|
|
# Example:
|
|
# let
|
|
# myBuild = cataclysmDDA.jenkins.latest.tiles.overrideAttrs (_: {
|
|
# x = "hello";
|
|
# });
|
|
#
|
|
# # This refers to the derivation before overriding! So, `badExample.x` is not accessible.
|
|
# badExample = myBuild.withMods (_: []);
|
|
#
|
|
# # `myBuild` is correctly referred by `withMods` and `goodExample.x` is accessible.
|
|
# goodExample = let
|
|
# inherit (cataclysmDDA) attachPkgs pkgs;
|
|
# in
|
|
# (attachPkgs pkgs myBuild).withMods (_: []);
|
|
# in
|
|
# goodExample.x # returns "hello"
|
|
attachPkgs =
|
|
pkgs: super:
|
|
let
|
|
self = super.overrideAttrs (old: {
|
|
passthru = old.passthru // {
|
|
pkgs = pkgs.override { build = self; };
|
|
withMods = wrapCDDA self;
|
|
};
|
|
});
|
|
in
|
|
self;
|
|
}
|