Skip to content

Commit 4f407ed

Browse files
committed
First attempt
1 parent 491800d commit 4f407ed

File tree

6 files changed

+40
-9
lines changed

6 files changed

+40
-9
lines changed

builder/comp-builder.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ let self =
8282
, enableTSanRTS ? false
8383

8484
# LLVM
85-
, useLLVM ? ghc.useLLVM
85+
, useLLVM ? false
8686
, smallAddressSpace ? false
8787

8888
}@drvArgs:

builder/hspkg-builder.nix

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ config:
1818
, ...
1919
}@pkg:
2020

21-
assert (if ghc.isHaskellNixCompiler or false then true
22-
else throw ("It is likely you used `haskell.compiler.X` instead of `haskell-nix.compiler.X`"
23-
+ pkgs.lib.optionalString (name != null) (" for " + name)));
24-
2521
let
2622
# Some packages bundled with GHC are not the same as they are in hackage.
2723
bundledSrc = {

lib/call-cabal-project-to-nix.nix

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,6 @@ let
107107
pkgs.haskell-nix.compiler."${compiler-nix-name}";
108108

109109
in
110-
assert (if ghc'.isHaskellNixCompiler or false then true
111-
else throw ("It is likely you used `haskell.compiler.X` instead of `haskell-nix.compiler.X`"
112-
+ forName));
113110

114111
let
115112
ghc = ghc';

overlays/ghc-packages.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ in rec {
163163
inherit subDir;
164164
includeSiblings = true;
165165
}
166-
else "${ghc.passthru.configured-src}/${subDir}";
166+
else "${ghc.configured-src}/${subDir}";
167167
nix = callCabal2Nix ghcName "${ghcName}-${pkgName}" src;
168168
}) (ghc-extra-pkgs ghc.version))
169169
final.buildPackages.haskell-nix.compiler;

test/with-nixpkgs-ghc/default.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
let
2+
3+
haskell-nix = import ../../default.nix { };
4+
nixpkgs = haskell-nix.inputs.nixpkgs.outPath;
5+
6+
o2 = (
7+
final: prev: {
8+
haskell-nix = prev.haskell-nix // {
9+
compiler = prev.haskell-nix.compiler // {
10+
ghc8107 = prev.haskell.compiler.ghc8107 // {
11+
# Add stuff not in nixpkgs ghc
12+
configured-src = prev.haskell-nix.compiler.ghc8107.configured-src; # Needed for reinstallableLibGhc to work
13+
};
14+
};
15+
};
16+
}
17+
);
18+
19+
pkgs = import nixpkgs {
20+
system = __currentSystem;
21+
inherit (haskell-nix) config;
22+
overlays = [
23+
# haskell-nix.overlays.haskell
24+
# haskell-nix.overlays.tools
25+
haskell-nix.overlay
26+
o2
27+
];
28+
};
29+
30+
prj = pkgs.haskell-nix.cabalProject {
31+
src = ./empty;
32+
cabalProject = "extra-packages: lens";
33+
compiler-nix-name = "ghc8107";
34+
};
35+
in
36+
37+
prj.plan-nix
38+

test/with-nixpkgs-ghc/empty/.almost

Whitespace-only changes.

0 commit comments

Comments
 (0)