Skip to content

Commit 3b1a3cb

Browse files
committed
It turns out args.name was used in two places.
1 parent 639999e commit 3b1a3cb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

builder/shell-for.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ let
7878
++ lib.optionals packageSetupDeps (map (p: p.setup.config)
7979
(lib.filter (p: p.buildType != "Simple") selectedPackages));
8080

81-
name = if lib.length selectedPackages == 1
81+
identifierName = if lib.length selectedPackages == 1
8282
then "ghc-shell-for-${(lib.head selectedPackages).identifier.name}"
8383
else "ghc-shell-for-packages";
8484

85+
name = if (mkDrvArgs.name or null) == null then identifierName else mkDrvArgs.name;
86+
8587
# We need to remove any dependencies which would bring in selected components (see above).
8688
packageInputs = removeSelectedInputs (lib.concatMap (cfg: cfg.depends) selectedConfigs)
8789
++ additionalPackages;
@@ -104,14 +106,14 @@ let
104106
doExactConfig = false;
105107
};
106108
configFiles = makeConfigFiles {
107-
fullName = args.name or name;
108-
identifier.name = name;
109+
fullName = name;
110+
identifier.name = identifierName;
109111
inherit component enableDWARF;
110112
chooseDrv = p: if withHaddock && p ? haddock then p.haddock else p;
111113
};
112114
ghcEnv = ghcForComponent {
113115
inherit configFiles;
114-
componentName = name;
116+
componentName = identifierName;
115117
postInstall = lib.optionalString withHoogle' ''
116118
ln -s ${hoogleIndex}/bin/hoogle $out/bin
117119
'';
@@ -145,7 +147,7 @@ let
145147
mkDrvArgs = builtins.removeAttrs args ["packages" "components" "additional" "withHoogle" "tools"];
146148
in
147149
mkShell (mkDrvArgs // {
148-
name = if (mkDrvArgs.name or null) == null then name else mkDrvArgs.name;
150+
inherit name;
149151

150152
buildInputs = systemInputs
151153
++ mkDrvArgs.buildInputs or [];

0 commit comments

Comments
 (0)