Skip to content

Commit 5f00c25

Browse files
committed
Use one lib
nixpkgs.lib does not depend on the system
1 parent c8827f6 commit 5f00c25

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

flake.nix

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
compiler = "ghc928";
7171
config = import ./config.nix;
7272

73+
inherit (nixpkgs) lib;
74+
7375
traceNames = prefix: builtins.mapAttrs (n: v:
7476
if builtins.isAttrs v
7577
then if v ? type && v.type == "derivation"
@@ -88,7 +90,7 @@
8890
"aarch64-darwin"
8991
];
9092

91-
forEachSystem = nixpkgs.lib.genAttrs systems;
93+
forEachSystem = lib.genAttrs systems;
9294

9395
in traceHydraJobs ({
9496
inherit config;
@@ -124,7 +126,7 @@
124126
# flake outputs so that we can incorporate the args passed
125127
# to the compat layer (e.g. sourcesOverride).
126128
overlays = [ allOverlays.combined ]
127-
++ nixpkgs.lib.optional checkMaterialization
129+
++ lib.optional checkMaterialization
128130
(final: prev: {
129131
haskell-nix = prev.haskell-nix // {
130132
checkMaterialization = true;
@@ -181,8 +183,8 @@
181183
builtins.listToAttrs (
182184
map
183185
(pkg: { name = pkg.name; value = pkg; })
184-
(nixpkgs.lib.collect
185-
nixpkgs.lib.isDerivation
186+
(lib.collect
187+
lib.isDerivation
186188
(import ./test
187189
rec {
188190
haskellNix = self.internal.compat { inherit system; };
@@ -205,7 +207,6 @@
205207

206208
requiredJobs = forEachSystem (system:
207209
let
208-
inherit (self.legacyPackages.${system}) lib;
209210
names = x:
210211
lib.filter
211212
(n: n != "recurseForDerivations" && n != "meta")

0 commit comments

Comments
 (0)