4 buildMod = callPackage ./builder.nix {
8 buildSoundPack = callPackage ./builder.nix {
12 buildTileSet = callPackage ./builder.nix {
16 wrapCDDA = callPackage ./wrapper.nix {};
18 # Required to fix `pkgs` and `withMods` attrs after applying `overrideAttrs`.
22 # myBuild = cataclysmDDA.jenkins.latest.tiles.overrideAttrs (_: {
26 # # This refers to the derivation before overriding! So, `badExample.x` is not accessible.
27 # badExample = myBuild.withMods (_: []);
29 # # `myBuild` is correctly referred by `withMods` and `goodExample.x` is accessible.
31 # inherit (cataclysmDDA) attachPkgs pkgs;
33 # (attachPkgs pkgs myBuild).withMods (_: []);
35 # goodExample.x # returns "hello"
36 attachPkgs = pkgs: super:
38 self = super.overrideAttrs (old: {
39 passthru = old.passthru // {
40 pkgs = pkgs.override { build = self; };
41 withMods = wrapCDDA self;