diff --git a/default.nix b/default.nix index 2570b9f..7f48895 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,4 @@ -args@{ pkgs ? import ./nix args, ... }: +args@{ pkgs ? import ./nix args, system ? null, ... }: { inherit (pkgs) arion tests; diff --git a/nix/default.nix b/nix/default.nix index 4c25cf1..c3fd071 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,8 +1,12 @@ /** * This is the entry-point for all nix execution in this project. */ -{ nixpkgsSrc ? ./nixpkgs.nix, ... }: -import (import ./nixpkgs.nix) { +{ nixpkgsSrc ? ./nixpkgs.nix +, system ? null +, ... +}: + +import (import ./nixpkgs.nix) ({ # Makes the config pure as well. See /top-level/impure.nix: config = { }; @@ -10,4 +14,6 @@ import (import ./nixpkgs.nix) { # all the packages are defined there: (import ./overlay.nix) ]; -} +} // (if system == null then {} else { + inherit system; +})) diff --git a/shell.nix b/shell.nix index 14e3ffe..f6c0ea0 100644 --- a/shell.nix +++ b/shell.nix @@ -1 +1 @@ -(import ./nix {}).arion-project.shell +args@{...}: (import ./nix args).arion-project.shell