Skip to content

Commit

Permalink
nixos/nixpkgs.nix: Make independent
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Dec 8, 2021
1 parent 18672bf commit 62e7f0e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixos/modules/misc/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ let
in

{
imports = [ ./assertions.nix ];

options.nixpkgs = {

pkgs = mkOption {
Expand Down
8 changes: 8 additions & 0 deletions nixos/modules/misc/nixpkgs/test.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ lib, stdenv }:
lib.recurseIntoAttrs {
invokeNixpkgsSimple =
(lib.nixos.core ({ config, modules, ... }: {
imports = [ modules.invokeNixpkgs ];
nixpkgs.system = stdenv.hostPlatform.system;
}))._module.args.pkgs.hello;
}
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,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 { };
node-red = handleTest ./node-red.nix {};
nomad = handleTest ./nomad.nix {};
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
Expand Down

0 comments on commit 62e7f0e

Please sign in to comment.