Pass system through project nix files

This commit is contained in:
Robert Hensing 2019-06-15 14:32:59 +02:00
parent ba6fa62c4a
commit 61cc348281
3 changed files with 11 additions and 5 deletions

View file

@ -1,4 +1,4 @@
args@{ pkgs ? import ./nix args, ... }: args@{ pkgs ? import ./nix args, system ? null, ... }:
{ {
inherit (pkgs) arion tests; inherit (pkgs) arion tests;

View file

@ -1,8 +1,12 @@
/** /**
* This is the entry-point for all nix execution in this project. * This is the entry-point for all nix execution in this project.
*/ */
{ nixpkgsSrc ? ./nixpkgs.nix, ... }: { nixpkgsSrc ? ./nixpkgs.nix
import (import ./nixpkgs.nix) { , system ? null
, ...
}:
import (import ./nixpkgs.nix) ({
# Makes the config pure as well. See <nixpkgs>/top-level/impure.nix: # Makes the config pure as well. See <nixpkgs>/top-level/impure.nix:
config = { config = {
}; };
@ -10,4 +14,6 @@ import (import ./nixpkgs.nix) {
# all the packages are defined there: # all the packages are defined there:
(import ./overlay.nix) (import ./overlay.nix)
]; ];
} } // (if system == null then {} else {
inherit system;
}))

View file

@ -1 +1 @@
(import ./nix {}).arion-project.shell args@{...}: (import ./nix args).arion-project.shell