mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
stdenv.mkDerivation: check meta.mainProgram from original meta
We define a meta variable in the same let block as the result of the `commonMeta` call. Avoiding evaluating the result of that call until we need to is preferable.
This commit is contained in:
@@ -866,7 +866,8 @@ let
|
||||
);
|
||||
|
||||
let
|
||||
env' = if meta ? mainProgram then env // { NIX_MAIN_PROGRAM = meta.mainProgram; } else env;
|
||||
env' =
|
||||
if attrs ? meta.mainProgram then env // { NIX_MAIN_PROGRAM = attrs.meta.mainProgram; } else env;
|
||||
|
||||
derivationArg = makeDerivationArgument (
|
||||
removeAttrs attrs [
|
||||
|
||||
Reference in New Issue
Block a user