···
-
stdenv.mkDerivation rec {
__structuredAttrs = true;
-
url = "mirror://kernel/linux/utils/kbd/${pname}-${version}.tar.xz";
-
hash = "sha256-AfWAbafR009ZS3sqauGrIyFTRM8QZOjtzTqQ/vl3ahE=";
# vlock is moved into its own output, since it depends on pam. This
···
-
"--enable-optional-progs"
-
(lib.enableFeature withVlock "vlock")
-
++ lib.optionals (!lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform) [
-
"ac_cv_func_malloc_0_nonnull=yes"
-
"ac_cv_func_realloc_0_nonnull=yes"
-
++ lib.optionals (!compress) [
···
mv fgGIod/trf{,-fgGIod}.map
mv colemak/{en-latin9,colemak}.map
-
1i bindir := $(vlock)/bin' \
-
src/vlock/Makefile.in \
-
+ lib.optionalString compress ''
-
# Fix paths to decompressors. Trailing space to avoid replacing `xz` in `".xz"`.
-
substituteInPlace src/libkbdfile/kbdfile.c \
-
--replace-fail 'gzip ' '${gzip}/bin/gzip ' \
-
--replace-fail 'bzip2 ' '${bzip2.bin}/bin/bzip2 ' \
-
--replace-fail 'xz ' '${xz.bin}/bin/xz ' \
-
--replace-fail 'zstd ' '${zstd.bin}/bin/zstd '
enableParallelBuilding = true;
-
for s in unicode_{start,stop}; do
-
substituteInPlace ''${!outputBin}/bin/$s \
-
--replace-fail /usr/bin/tty ${coreutils}/bin/tty
-
moveToOutput "bin/$s" "$scripts"
++ lib.optionals withVlock [ pam ];
-
NIX_LDFLAGS = lib.optional stdenv.hostPlatform.isStatic "-laudit";
-
outputChecks.out.disallowedRequisites = lib.optionals (!compress) [
-
inherit (nixosTests) keymap kbd-setfont-decompress kbd-update-search-paths-patch;
updateScript = gitUpdater {
# No nicer place to find latest release.
url = "https://github.com/legionus/kbd.git";
homepage = "https://kbd-project.org/";
description = "Linux keyboard tools and keyboard maps";
-
platforms = platforms.linux;
-
license = licenses.gpl2Plus;
-
maintainers = with maintainers; [ davidak ];
···
+
version = "2.8.0-unstable-2025-08-12";
__structuredAttrs = true;
+
url = "https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git";
+
rev = "46295167a55643e941c8cdcfd2cb76bd138c851c";
+
hash = "sha256-m1aVfsEme/BnyJogOPvGcOrSJfli8B/TrGxOm4POt0w=";
# vlock is moved into its own output, since it depends on pam. This
···
···
mv fgGIod/trf{,-fgGIod}.map
mv colemak/{en-latin9,colemak}.map
+
# Perl and Bash only used during build time
+
patchShebangs --build contrib/
+
"--enable-optional-progs"
+
(lib.enableFeature withVlock "vlock")
+
++ lib.optionals (!lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform) [
+
"ac_cv_func_malloc_0_nonnull=yes"
+
"ac_cv_func_realloc_0_nonnull=yes"
enableParallelBuilding = true;
+
autoPatchelfHook # for patching dlopen()
++ lib.optionals withVlock [ pam ];
+
substituteInPlace $out/bin/unicode_{start,stop} \
+
--replace-fail /usr/bin/tty ${coreutils}/bin/tty
+
moveToOutput bin/unicode_start $scripts
+
moveToOutput bin/unicode_stop $scripts
+
+ lib.optionalString withVlock ''
+
moveToOutput bin/vlock $vlock
+
moveToOutput etc/pam.d/vlock $vlock
+
outputChecks.out.disallowedRequisites = [
updateScript = gitUpdater {
# No nicer place to find latest release.
url = "https://github.com/legionus/kbd.git";
+
systemString = if stdenv.buildPlatform.isAarch64 then "gnu64" else "aarch64-multiplatform";
+
pkgsCross.${systemString}.kbd;
+
inherit (nixosTests) keymap kbd-setfont-decompress kbd-update-search-paths-patch;
homepage = "https://kbd-project.org/";
description = "Linux keyboard tools and keyboard maps";
+
platforms = lib.platforms.linux;
+
license = lib.licenses.gpl2Plus;
+
maintainers = with lib.maintainers; [ davidak ];