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;

View File

@ -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 <nixpkgs>/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;
}))

View File

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