summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2025-01-30 11:55:29 -0600
committerMitchell Hashimoto <m@mitchellh.com>2025-02-11 08:25:34 -0800
commit3a8c934b1937762e00de1959d9f25a25794b4d85 (patch)
tree33e2cf3c95f76c160f591f4f16083e444f10021b /flake.nix
parentab71dac282563d0cbd2cf32410b8d79dc3992a11 (diff)
nix: use zig2nix to manage nix cache/deps
This brings the internal package more in line with how the nixpkgs package is built. It also handles recursive dependencies better than the current system.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 3256c7c15..cf82d392a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,6 +8,7 @@
# glibc versions used by our dependencies from Nix are compatible with the
# system glibc that the user is building for.
nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.11";
+ flake-utils.url = "github:numtide/flake-utils";
# Used for shell.nix
flake-compat = {
@@ -19,9 +20,18 @@
url = "github:mitchellh/zig-overlay";
inputs = {
nixpkgs.follows = "nixpkgs-stable";
+ flake-utils.follows = "flake-utils";
flake-compat.follows = "";
};
};
+
+ zig2nix = {
+ url = "github:jcollie/zig2nix?ref=c311d8e77a6ee0d995f40a6e10a89a3a4ab04f9a";
+ inputs = {
+ nixpkgs.follows = "nixpkgs-stable";
+ flake-utils.follows = "flake-utils";
+ };
+ };
};
outputs = {
@@ -29,6 +39,7 @@
nixpkgs-unstable,
nixpkgs-stable,
zig,
+ zig2nix,
...
}:
builtins.foldl' nixpkgs-stable.lib.recursiveUpdate {} (
@@ -40,6 +51,7 @@
devShell.${system} = pkgs-stable.callPackage ./nix/devShell.nix {
zig = zig.packages.${system}."0.13.0";
wraptest = pkgs-stable.callPackage ./nix/wraptest.nix {};
+ zig2nix = zig2nix;
};
packages.${system} = let