-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
30 lines (30 loc) · 878 Bytes
/
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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
geng.url = "github:geng-engine/cargo-geng";
geng.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { geng, nixpkgs, systems, ... }:
let
pkgsFor = system: import nixpkgs {
inherit system;
};
forEachSystem = f: nixpkgs.lib.genAttrs (import systems) (system:
let pkgs = pkgsFor system;
in f system pkgs);
in
{
devShells = forEachSystem (system: pkgs:
{
default = geng.lib.mkShell {
inherit system;
target.linux.enable = true;
target.android.enable = true;
target.windows.enable = true;
target.web.enable = true;
};
});
formatter = forEachSystem (system: pkgs: pkgs.nixpkgs-fmt);
};
}