Skip to content

Commit 828a04f

Browse files
committed
Allow source spec to be a file
1 parent 0f640b4 commit 828a04f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/ghc/configured-src.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ stdenv.mkDerivation (rec {
1919
patches = ghc-patches;
2020
name = "${targetPrefix}ghc-${ghc-version}-configured-src";
2121

22-
# Make sure we never relax`$PATH` and hooks support for compatibility.
22+
# Make sure we never relax`$PATH` and hooks support for compatability.
2323
strictDeps = true;
2424

2525
nativeBuildInputs = [
@@ -40,7 +40,9 @@ stdenv.mkDerivation (rec {
4040

4141
postPatch = "patchShebangs .";
4242

43-
src = fetchurl { inherit (src-spec) url sha256; };
43+
src = if src-spec ? file
44+
then src-spec.file
45+
else fetchurl { inherit (src-spec) url sha256; };
4446

4547
# GHC is a bit confused on its cross terminology.
4648
preConfigure = ''

0 commit comments

Comments
 (0)