From d465f4819400de7c8d874d50b982301f28a84605 Mon Sep 17 00:00:00 2001 From: Mason Mackaman Date: Wed, 28 Feb 2024 07:18:44 -0600 Subject: [PATCH] Add the current system if --impure is used (#115) --- lib.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib.nix b/lib.nix index c007888..b8ff993 100644 --- a/lib.nix +++ b/lib.nix @@ -43,7 +43,15 @@ let in builtins.foldl' op attrs (builtins.attrNames ret); in - builtins.foldl' op { } systems + builtins.foldl' op { } + (systems + ++ # add the current system if --impure is used + (if builtins?currentSystem then + if builtins.elem builtins.currentSystem systems + then [] + else [ builtins.currentSystem ] + else + [])) ; # eachSystemMap using defaultSystems