Allow passing system into common.nix, rather than always using builtin.currentSystem

This commit is contained in:
Brian Picciano 2025-01-09 22:05:41 +01:00
parent 7a143f46fc
commit 6a436267a4

View file

@ -1,4 +1,6 @@
let {
system ? builtins.currentSystem,
}: let
lock = builtins.fromJSON (builtins.readFile ../flake.lock); lock = builtins.fromJSON (builtins.readFile ../flake.lock);
inherit (lock.nodes.flake-compat.locked) owner repo rev narHash; inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
@ -8,7 +10,7 @@ let
sha256 = narHash; sha256 = narHash;
}; };
flake = (import flake-compat { system = builtins.currentSystem; src = ../.; }); flake = (import flake-compat { inherit system; src = ../.; });
in in
rec { rec {
pkgsSrc = flake.defaultNix.inputs.nixpkgs; pkgsSrc = flake.defaultNix.inputs.nixpkgs;