Skip to content

Commit fb1dbae

Browse files
committed
Simplify c688e95
1 parent c688e95 commit fb1dbae

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

default.nix

+7-16
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,16 @@
22
, compiler ? "ghc90"
33
}:
44
let
5-
# Trick I learned from https://nix.dev/guides/best-practices.html#updating-nested-attribute-sets
6-
# TODO:
7-
# pkgs.lib.recursiveUpdate { a = { b = 1; }; } { a = { c = 3;}; }
8-
95
nixpkgs =
10-
nixpkgsRaw //
11-
{ pkgs = nixpkgsRaw.pkgs //
12-
{ haskell = nixpkgsRaw.pkgs.haskell //
13-
{ packages = nixpkgsRaw.pkgs.haskell.packages //
14-
{ "${compiler}" =
15-
nixpkgsRaw.pkgs.haskell.packages.${compiler}.override {
16-
overrides = self: super: {
17-
statistics = nixpkgsRaw.pkgs.haskell.lib.dontCheck super.statistics;
18-
flatparse = nixpkgsRaw.pkgs.haskell.lib.dontCheck super.flatparse;
19-
};
20-
};
6+
nixpkgsRaw.pkgs.lib.recursiveUpdate # See https://nix.dev/guides/best-practices.html#updating-nested-attribute-sets
7+
nixpkgsRaw
8+
{ pkgs.haskell.packages.${compiler} =
9+
nixpkgsRaw.pkgs.haskell.packages.${compiler}.override {
10+
overrides = self: super: {
11+
statistics = nixpkgsRaw.pkgs.haskell.lib.dontCheck super.statistics;
12+
flatparse = nixpkgsRaw.pkgs.haskell.lib.dontCheck super.flatparse;
2113
};
2214
};
23-
};
2415
};
2516

2617
bellman-ford =

0 commit comments

Comments
 (0)