From 6a436267a473a1bbcfa58484e6eac7ae59752611 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Thu, 9 Jan 2025 22:05:41 +0100 Subject: [PATCH] Allow passing system into common.nix, rather than always using builtin.currentSystem --- nix/common.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nix/common.nix b/nix/common.nix index 1ad809bb..b922dd39 100644 --- a/nix/common.nix +++ b/nix/common.nix @@ -1,4 +1,6 @@ -let +{ + system ? builtins.currentSystem, +}: let lock = builtins.fromJSON (builtins.readFile ../flake.lock); inherit (lock.nodes.flake-compat.locked) owner repo rev narHash; @@ -8,7 +10,7 @@ let sha256 = narHash; }; - flake = (import flake-compat { system = builtins.currentSystem; src = ../.; }); + flake = (import flake-compat { inherit system; src = ../.; }); in rec { pkgsSrc = flake.defaultNix.inputs.nixpkgs;