-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
29 lines (29 loc) · 1010 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
{
description = "Declarative Disk Management";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in {
formatter = forEachSupportedSystem ({pkgs}: pkgs.nixfmt-rfc-style);
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
util-linux.dev
util-linux
];
shellHook = ''
PATH=$PATH:$PWD/zig-out/bin
'';
C_INCLUDE_PATH = "${pkgs.util-linux.dev}/include";
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath [pkgs.stdenv.cc.cc pkgs.util-linux]}";
packages = with pkgs; [
zig
];
};
});
};
}