From 6be63ce59010be21642db26b11c28a903ea1bc29 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 25 May 2023 15:45:34 +0200 Subject: kbd: split vlock into its own output This avoids a dependency on pam when only the actual keyboard data is used. --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ pkgs/os-specific/linux/kbd/default.nix | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index 9746363b1f6..8c46a66bc98 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -32,6 +32,8 @@ - `util-linux` is now supported on Darwin and is no longer an alias to `unixtools`. Use the `unixtools.util-linux` package for access to the Apple variants of the utilities. +- The `vlock` program from the `kbd` package has been moved into its own package output and should now be referenced explicitly as `kbd.vlock` or replaced with an alternative such as the standalone `vlock` package or `physlock`. + - `fileSystems..autoFormat` now uses `systemd-makefs`, which does not accept formatting options. Therefore, `fileSystems..formatOptions` has been removed. - `fileSystems..autoResize` now uses `systemd-growfs` to resize the file system online in stage 2. This means that `f2fs` and `ext2` can no longer be auto resized, while `xfs` and `btrfs` now can be. diff --git a/pkgs/os-specific/linux/kbd/default.nix b/pkgs/os-specific/linux/kbd/default.nix index f4290352c93..fc7da8fe9ba 100644 --- a/pkgs/os-specific/linux/kbd/default.nix +++ b/pkgs/os-specific/linux/kbd/default.nix @@ -23,7 +23,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-zN9FI4emOAlz0pJzY+nLuTn6IGiRWm+Tf/nSRSICRoM="; }; - outputs = [ "out" "dev" ]; + # vlock is moved into its own output, since it depends on pam. This + # reduces closure size for most use cases. + outputs = [ "out" "vlock" "dev" ]; configureFlags = [ "--enable-optional-progs" @@ -55,6 +57,12 @@ stdenv.mkDerivation rec { --replace 'bzip2 ' '${bzip2.bin}/bin/bzip2 ' \ --replace 'xz ' '${xz.bin}/bin/xz ' \ --replace 'zstd ' '${zstd.bin}/bin/zstd ' + + sed -i ' + 1i prefix:=$(vlock) + 1i bindir := $(vlock)/bin' \ + src/vlock/Makefile.in \ + src/vlock/Makefile.am ''; postInstall = '' -- cgit 1.4.1