Skip to content

Commit 12d9ba3

Browse files
committed
working
1 parent bdaee63 commit 12d9ba3

23 files changed

+196
-450
lines changed

builder/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let
6868
inherit evalPackages;
6969
version = "5.0.18.4";
7070
# index-state = pkgs.haskell-nix.internalHackageIndexState;
71-
index-state = "2024-05-15T00:00:00Z";
71+
index-state = "2024-05-14T23:56:58Z";
7272
}
7373
}:
7474
let

builder/make-config-files.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
let
66
# Sort and remove duplicates from nonReinstallablePkgs.
77
# That way changes to the order of nonReinstallablePkgs does not require rebuilds.
8-
nonReinstallablePkgs' = let x = __attrNames (lib.genAttrs nonReinstallablePkgs (x: x)); in __trace x x;
8+
nonReinstallablePkgs' = __attrNames (lib.genAttrs nonReinstallablePkgs (x: x));
99

1010
ghc = if enableDWARF then defaults.ghc.dwarf else defaults.ghc;
1111

@@ -86,7 +86,7 @@ let
8686
8787
unwrappedGhc=${ghc}
8888
ghcDeps=${ghc.cachedDeps
89-
or (__trace "WARNING: ghc.cachedDeps not found" haskellLib.makeCompilerDeps ghc)}
89+
or (haskellLib.makeCompilerDeps ghc).cachedDeps}
9090
${ # Copy over the nonReinstallablePkgs from the global package db.
9191
''
9292
for p in ${lib.concatStringsSep " " nonReinstallablePkgs'}; do
@@ -151,7 +151,6 @@ let
151151
152152
for p in "''${pkgsHostTarget[@]}"; do
153153
if [ -e $p/envDep ]; then
154-
echo "But not here"
155154
cat $p/envDep >> $configFiles/ghc-environment
156155
fi
157156
${ lib.optionalString component.doExactConfig ''

builder/shell-for.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, stdenv, mkShell, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, evalPackages, compiler }:
1+
{ lib, stdenv, mkShell, glibcLocales, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, evalPackages, compiler }:
22

33
{ # `packages` function selects packages that will be worked on in the shell itself.
44
# These packages will not be built by `shellFor`, but their

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,13 @@
22
description = "Alternative Haskell Infrastructure for Nixpkgs";
33

44
inputs = {
5-
nixpkgs.follows = "nixpkgs-2405";
6-
nixpkgs-2405 = { url = "github:NixOS/nixpkgs/release-24.05"; };
5+
nixpkgs.follows = "nixpkgs-2411";
6+
nixpkgs-2405 = { url = "github:NixOS/nixpkgs/release-24.11"; };
77
flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; };
8-
hydra.url = "hydra";
98
hackage = {
109
url = "github:kronor-io/hackage.nix/main";
1110
flake = false;
1211
};
13-
stackage = {
14-
url = "github:input-output-hk/stackage.nix";
15-
flake = false;
16-
};
17-
nix-tools-static = {
18-
url = "github:input-output-hk/haskell-nix-example/nix";
19-
flake = false;
20-
};
21-
cabal-36 = {
22-
url = "github:haskell/cabal/3.6";
23-
flake = false;
24-
};
25-
2612
hackage-db = {
2713
url = "github:michaelpj/hackage-db/83f819cb08742d3c86a83b407d45c1f6c1c7e299";
2814
flake = false;

lib/cabal-project-parser.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ let
145145
repoContents = if inputMap ? ${attrs.url}
146146
# If there is an input use it to make `file:` url and create a suitable `.cabal/packages/${name}` directory
147147
then evalPackages.runCommand name ({
148-
nativeBuildInputs = [ cabal-install ] ++ evalPackages.haskell-nix.cabal-issue-8352-workaround;
148+
nativeBuildInputs = [ cabal-install ];
149149
preferLocalBuild = true;
150150
}) ''
151151
HOME=$(mktemp -d)
@@ -186,7 +186,7 @@ let
186186
# Output of hackage-to-nix
187187
hackage = import (
188188
evalPackages.runCommand ("hackage-to-nix-" + name) {
189-
nativeBuildInputs = [ cabal-install evalPackages.curl nix-tools ];
189+
nativeBuildInputs = [ cabal-install evalPackages.curl nix-tools.exes.hackage-to-nix ];
190190
LOCALE_ARCHIVE = pkgs.lib.optionalString (evalPackages.stdenv.buildPlatform.libc == "glibc") "${evalPackages.glibcLocales}/lib/locale/locale-archive";
191191
LANG = "en_US.UTF-8";
192192
preferLocalBuild = true;

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
, ...
6666
}@args:
6767
let
68-
inherit (evalPackages.haskell-nix) materialize dotCabal;
68+
inherit (evalPackages.haskell-nix) dotCabal;
6969

7070
# These defaults are here rather than in modules/cabal-project.nix to make them
7171
# lazy enough to avoid infinite recursion issues.
@@ -74,7 +74,7 @@ let
7474
nix-tools = if args.nix-tools or null != null
7575
then args.nix-tools
7676
else evalPackages.haskell-nix.nix-tools;
77-
cabal-install = nix-tools.exes.cabal;
77+
cabal-install = pkgs.bootstrap-cabal-install;
7878
forName = pkgs.lib.optionalString (name != null) (" for " + name);
7979
nameAndSuffix = suffix: if name == null then suffix else name + "-" + suffix;
8080

@@ -364,19 +364,12 @@ let
364364
'';
365365
};
366366

367-
plan-nix = materialize ({
368-
inherit materialized;
369-
sha256 = plan-sha256;
370-
sha256Arg = "plan-sha256";
371-
this = "project.plan-nix" + (if name != null then " for ${name}" else "");
372-
} // pkgs.lib.optionalAttrs (checkMaterialization != null) {
373-
inherit checkMaterialization;
374-
}) (evalPackages.runCommand (nameAndSuffix "plan-to-nix-pkgs") {
367+
plan-nix = evalPackages.runCommand (nameAndSuffix "plan-to-nix-pkgs") {
375368
nativeBuildInputs =
376369
# The things needed from nix-tools
377370
[ nix-tools.exes.make-install-plan
378371
nix-tools.exes.plan-to-nix
379-
nix-tools.exes.cabal
372+
pkgs.bootstrap-cabal-install
380373
]
381374
++ pkgs.lib.optional supportHpack nix-tools.exes.hpack
382375
++ [dummy-ghc dummy-ghc-pkg evalPackages.rsync evalPackages.gitMinimal evalPackages.allPkgConfigWrapper ];
@@ -462,7 +455,6 @@ let
462455
# packages used by the solver (cached-index-state >= index-state-max).
463456
pkgs.lib.optionalString (index-state != null) "--index-state=${index-state}"
464457
} \
465-
-v3 \
466458
-w ${
467459
# We are using `-w` rather than `--with-ghc` here to override
468460
# the `with-compiler:` in the `cabal.project` file.
@@ -523,7 +515,7 @@ let
523515
524516
# move pkgs.nix to default.nix ensure we can just nix `import` the result.
525517
mv $out${subDir'}/pkgs.nix $out${subDir'}/default.nix
526-
'');
518+
'';
527519
in {
528520
projectNix = plan-nix;
529521
inherit index-state-max src;

lib/make-dummy-ghc-data.nix

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,6 @@ let
2222
inherit (pkgs.haskell-nix) checkMaterialization;
2323
makeDummyGhcData = ghc: ghc // {
2424
dummy-ghc-data =
25-
let
26-
materialized = materialized-dir + "/dummy-ghc/${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}"
27-
+ pkgs.lib.optionalString (builtins.compareVersions ghc.version "8.10" < 0 && ghc.targetPrefix == "" && builtins.compareVersions pkgs.lib.version "22.05" < 0) "-old";
28-
in pkgs.haskell-nix.materialize ({
29-
sha256 = null;
30-
sha256Arg = "sha256";
31-
materialized = if __pathExists materialized
32-
then materialized
33-
else __trace "WARNING: No materialized dummy-ghc-data. mkdir ${toString materialized}"
34-
null;
35-
reasonNotSafe = null;
36-
} // pkgs.lib.optionalAttrs (checkMaterialization != null) {
37-
inherit checkMaterialization;
38-
}) (
3925
runCommand ("dummy-data-" + ghc.name) {
4026
nativeBuildInputs = [ ghc ];
4127
} ''
@@ -69,7 +55,7 @@ let
6955
| tr '\r' '\n' \
7056
| sed -e '$ d' \
7157
> $out/ghc-pkg/dump-global
72-
'');
58+
'';
7359
} // pkgs.lib.optionalAttrs (ghc ? dwarf) {
7460
dwarf = makeDummyGhcData ghc.dwarf;
7561
} // pkgs.lib.optionalAttrs (ghc ? smallAddressSpace) {

lib/materialize.nix

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)