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"
39 self = super.overrideAttrs (old: {
40 passthru = old.passthru // {
41 pkgs = pkgs.override { build = self; };
42 withMods = wrapCDDA self;