summary refs log tree commit diff
path: root/lib/customisation.nix
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-02-03 12:49:08 +0200
committerGitHub <noreply@github.com>2023-02-03 12:49:08 +0200
commitdcc7df7fe6e74ac3b2895a1f2c6873b00278c83a (patch)
treee102e2eb4f76c7c884cb05763f425584e5f8a7f4 /lib/customisation.nix
parent931f54ceff33e3dce7edd0b853e36e7444294419 (diff)
parenta0f4e8746d15683d75e590b08334df7faf4c7621 (diff)
downloadnixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.tar
nixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.tar.gz
nixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.tar.bz2
nixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.tar.lz
nixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.tar.xz
nixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.tar.zst
nixpkgs-dcc7df7fe6e74ac3b2895a1f2c6873b00278c83a.zip
Merge pull request #211685 from Artturin/splicingstuff1-split
Diffstat (limited to 'lib/customisation.nix')
-rw-r--r--lib/customisation.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index 42d711cf5fb..cb3a4b56115 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -213,7 +213,14 @@ rec {
             outputSpecified = true;
             drvPath = assert condition; drv.${outputName}.drvPath;
             outPath = assert condition; drv.${outputName}.outPath;
-          };
+          } //
+            # TODO: give the derivation control over the outputs.
+            #       `overrideAttrs` may not be the only attribute that needs
+            #       updating when switching outputs.
+            lib.optionalAttrs (passthru?overrideAttrs) {
+              # TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.
+              overrideAttrs = f: (passthru.overrideAttrs f).${outputName};
+            };
         };
 
       outputsList = map outputToAttrListElement outputs;