Skip to content

Commit b9ea2ea

Browse files
committed
Splits nixpkgs for CTL, Rust, Haskell.nix and the rest
1 parent f73ef81 commit b9ea2ea

File tree

4 files changed

+169
-147
lines changed

4 files changed

+169
-147
lines changed

extras/build.nix

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
# Makes a per system `lbf-nix` option.
2525
perSystem = flake-parts-lib.mkPerSystemOption
26-
({ pkgs, system, config, ... }: {
26+
({ pkgs, config, pkgsForCtl, pkgsForHaskellNix, pkgsForRust, ... }: {
2727

2828
options.lbf-nix = lib.mkOption {
2929
type = lib.types.anything;
@@ -41,25 +41,12 @@
4141
lbf-nix = {
4242
# NOTE(bladyjoker): If you need to add a function the export externally and use internally via config.lbf-nix, add it here.
4343

44-
purescriptFlake =
45-
let
46-
pkgs' = import inputs.ctl-nixpkgs {
47-
inherit system;
48-
inherit (inputs.haskell-nix) config;
49-
overlays = [
50-
inputs.haskell-nix.overlay
51-
inputs.iohk-nix.overlays.crypto
52-
inputs.ctl.overlays.purescript
53-
inputs.ctl.overlays.spago
54-
];
55-
};
56-
in
57-
import ./flake-purescript.nix pkgs'; # TODO(bladyjoker): If we use recent nixpkgs we get: `error: nodejs_14 has been removed as it is EOL`. That's why we use CTL's old nixpkgs.
44+
purescriptFlake = import ./flake-purescript.nix pkgsForCtl;
5845

59-
rustFlake = import ./flake-rust.nix pkgs;
46+
rustFlake = import ./flake-rust.nix pkgsForRust;
6047
haskellData = import ./haskell-data.nix pkgs;
61-
haskellFlake = import ./flake-haskell.nix pkgs;
62-
haskellPlutusFlake = import ./flake-haskell-plutus.nix inputs.cardano-haskell-packages pkgs;
48+
haskellFlake = import ./flake-haskell.nix pkgsForHaskellNix;
49+
haskellPlutusFlake = import ./flake-haskell-plutus.nix inputs.cardano-haskell-packages pkgsForHaskellNix;
6350
typescriptFlake = import ./flake-typescript.nix pkgs;
6451
};
6552

0 commit comments

Comments
 (0)