Skip to content

Commit b7fe0a1

Browse files
committed
nixos/test/installer: make sure we can build the nixos udev rules
1 parent 51a43f8 commit b7fe0a1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

nixos/modules/services/hardware/udev.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ let
5757
packages = lib.unique (map toString udevPackages);
5858

5959
nativeBuildInputs = [
60-
pkgs.systemdMinimal
60+
# We only include the out output here to avoid needing to include all
61+
# other outputs in the installer tests as well
62+
# We only need the udevadm command anyway
63+
pkgs.systemdMinimal.out
6164
];
6265
}
6366
''

nixos/tests/installer.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ let
681681
{
682682
# The configuration of the system used to run "nixos-install".
683683
installer =
684-
{ config, ... }:
684+
{ config, pkgs, ... }:
685685
{
686686
imports = [
687687
commonConfig
@@ -740,6 +740,11 @@ let
740740
xorg.lndir
741741
shellcheck-minimal
742742

743+
# Only the out output is included here, which is what is
744+
# required to build the NixOS udev rules
745+
# See the comment in services/hardware/udev.nix
746+
systemdMinimal.out
747+
743748
# add curl so that rather than seeing the test attempt to download
744749
# curl's tarball, we see what it's trying to download
745750
curl

0 commit comments

Comments
 (0)