-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
69 lines (58 loc) · 1.71 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
description = "A unified NixOS tooling replacement for nixos-* utilities";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
# Make sure this flake input is in sync with the Zig-fetched package
# by updating the corresponding dependency inside build.zig.zon.
# Otherwise, the symbols exported by Nix may # not be guaranteed to
# be the same as the ones in the upstream Nix bindings package.
# zignix.url = "github:water-sucks/zignix";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
zig-deps-fod.url = "github:water-sucks/zig-deps-fod";
};
outputs = {
self,
nixpkgs,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [];
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = {
pkgs,
lib,
system,
...
}: let
inherit (pkgs) callPackage zig pkg-config mkShell;
# nix = inputs.zignix.inputs.nix.packages.${system}.nix;
in {
packages = rec {
default = nixos;
nixos = callPackage (import ./package.nix) {
revision = self.rev or "dirty";
inherit (inputs.zig-deps-fod.lib) fetchZigDeps;
};
nixosLegacy = nixos.override {flake = false;};
};
devShells.default = mkShell {
name = "nixos-shell";
nativeBuildInputs = [
zig
pkg-config
];
ZIG_DOCS = "${zig}/doc/langref.html";
};
};
flake = {
nixosModules = {
nixos-cli = import ./module.nix self;
};
};
};
}