Skip to content

Commit 9289103

Browse files
committed
comp-builder: exclude hsc2hs from build-tools as it is never used,
since it is provided by ghc env, which is first in PATH. This avoid possible collisions when using eg. devshells, which fuse all binaries into a single output directory.
1 parent 0426fa1 commit 9289103

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

builder/comp-builder.nix

+7-4
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,12 @@ let
239239
executableToolDepends =
240240
(lib.concatMap (c: if c.isHaskell or false
241241
then builtins.attrValues (c.components.exes or {})
242-
else [c])
243-
(builtins.filter (x: !(isNull x))
244-
(map
242+
else [c])
243+
(builtins.filter (x: !(isNull x)
244+
# We always exclude hsc2hs from build-tools because it is unecessary as it is provided by ghc
245+
# and hsc2hs from ghc is first in PATH so the one from build-tools is never used.
246+
&& x.identifier.name or "" != "hsc2hs")
247+
(map
245248
(p: if builtins.isFunction p
246249
then p { inherit (package.identifier) version; inherit revision; }
247250
else p) build-tools))) ++
@@ -328,7 +331,7 @@ let
328331
outputHashMode = "recursive";
329332
outputHashAlgo = "sha256";
330333
};
331-
334+
332335
drv = stdenv.mkDerivation (commonAttrs // contentAddressedAttrs // {
333336
pname = nameOnly;
334337
inherit (package.identifier) version;

0 commit comments

Comments
 (0)