From 382761c8d2946c65c317f5a213b1a88de1598296 Mon Sep 17 00:00:00 2001 From: "lincoln auster [they/them]" Date: Fri, 26 Nov 2021 13:10:32 -0700 Subject: [PATCH] allow pure build of zig derivation Prior to this commit, if nixpkgs was imported with a definite system, it would *mostly* work as intended and not make impure calls to Nix's builtins.CurrentSystem, except for here in zig_raw.nix, which doesn't respect sources and pkgs. The solution is simple: just inherit sources and pkgs when we make a versioned zig_raw in zig.nix. --- nix/zig.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nix/zig.nix b/nix/zig.nix index a35ccf6..55442ad 100644 --- a/nix/zig.nix +++ b/nix/zig.nix @@ -1,3 +1,5 @@ { sources ? import ./sources.nix, pkgs ? import sources.nixpkgs { } }: -(import ./zig_raw.nix { }) "0.6.0" +(import ./zig_raw.nix { + inherit sources pkgs; +}) "0.6.0"