-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
42 lines (35 loc) · 1.4 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nix-github-actions.url = "github:nix-community/nix-github-actions";
inputs.nix-github-actions.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, flake-utils, nix-github-actions }:
with nixpkgs.lib;
with flake-utils.lib;
with nix-github-actions.lib;
eachSystem nixpkgs.legacyPackages.x86_64-linux.nodejs.meta.platforms
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
lib = prev.lib // import ./lib.nix { pkgs = final; writers = final.writers; };
react = final.callPackage ./packages/react { };
components = final.callPackage ./packages/components { };
documentation = final.callPackage ./documentation { };
storybook = final.callPackage ./packages/components/.storybook { };
})
];
};
in
rec {
checks = packages;
formatter = pkgs.nixpkgs-fmt;
packages = { inherit (pkgs) components documentation react storybook; };
devShells.default = pkgs.callPackage ./shell.nix { };
}
)
//
{ githubActions = mkGithubMatrix { checks = getAttrs (attrNames githubPlatforms) self.checks; }; };
}