on f413621 help sign in
haskell.nix/flake.nix
28 lines 911 B history raw
1{
2 description = "Alternative Haskell Infrastructure for Nixpkgs";
4 edition = 201909;
6 outputs = { self }: {
7 # Using the eval-on-build version here as the plan is that
8 # `builtins.currentSystem` will not be supported in flakes.
9 # https://github.com/NixOS/rfcs/pull/49/files#diff-a5a138ca225433534de8d260f225fe31R429
10 overlay = (self.overlays {}).combined-eval-on-build;
11 overlays = import ./overlays;
12 config = import ./config.nix;
13 sources = import ./nixpkgs;
14 nixpkgsArgs = {
15 inherit (self) config;
16 overlays = [ self.overlay ];
17 };
18 legacyPackages = let
19 genAttrs = lst: f:
20 builtins.listToAttrs (map (name: {
21 inherit name;
22 value = f name;
23 }) lst);
24 in genAttrs [ "x86_64-linux" "x86_64-darwin" ] (system:
25 import self.sources.nixpkgs
26 (self.nixpkgsArgs // { localSystem = { inherit system; }; }));
27 };