nixos/nixpkgs.nix: Make independent

(cherry picked from commit 62e7f0eda1c5acf0beb13a00a23f577912a6b8eb)
main
Robert Hensing 3 years ago
parent fbd038eca2
commit be3967e351
  1. 5
      nixos/modules/misc/nixpkgs.nix
  2. 8
      nixos/modules/misc/nixpkgs/test.nix
  3. 4
      nixos/tests/all-tests.nix

@ -64,6 +64,11 @@ let
in
{
imports = [
./assertions.nix
./meta.nix
];
options.nixpkgs = {
pkgs = mkOption {

@ -0,0 +1,8 @@
{ evalMinimalConfig, pkgs, lib, stdenv }:
lib.recurseIntoAttrs {
invokeNixpkgsSimple =
(evalMinimalConfig ({ config, modulesPath, ... }: {
imports = [ (modulesPath + "/misc/nixpkgs.nix") ];
nixpkgs.system = stdenv.hostPlatform.system;
}))._module.args.pkgs.hello;
}

@ -19,6 +19,9 @@ let
handleTestOn = systems: path: args:
if elem system systems then handleTest path args
else {};
nixosLib = import ../lib {};
evalMinimalConfig = module: nixosLib.evalModules { modules = [ module ]; };
in
{
_3proxy = handleTest ./3proxy.nix {};
@ -327,6 +330,7 @@ in
nix-serve-ssh = handleTest ./nix-serve-ssh.nix {};
nixops = handleTest ./nixops/default.nix {};
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; };
node-red = handleTest ./node-red.nix {};
nomad = handleTest ./nomad.nix {};
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};

Loading…
Cancel
Save