nixpkgs-suyu/pkgs/os-specific/linux/kbd/default.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, autoreconfHook, gzip, bzip2, pkgconfig, flex, check, pam }:
stdenv.mkDerivation rec {
name = "kbd-${version}";
version = "2.0.3";
src = fetchurl {
url = "mirror://kernel/linux/utils/kbd/${name}.tar.xz";
2015-08-18 20:35:50 +02:00
sha256 = "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs";
};
2015-04-02 03:36:31 +02:00
configureFlags = [
"--enable-optional-progs"
"--enable-libkeymap"
"--disable-nls"
];
patches = [ ./console-fix.patch ./search-paths.patch ];
postPatch =
''
2016-07-01 02:51:24 +02:00
# Add Neo keymap subdirectory
2015-08-16 01:46:50 +02:00
sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am
# Fix the path to gzip/bzip2.
2015-04-02 03:36:31 +02:00
substituteInPlace src/libkeymap/findfile.c \
--replace gzip ${gzip}/bin/gzip \
2015-08-21 19:35:23 +02:00
--replace bzip2 ${bzip2.bin}/bin/bzip2 \
# We get a warning in armv5tel-linux and the fuloong2f, so we
# disable -Werror in it.
${stdenv.lib.optionalString (stdenv.isArm || stdenv.system == "mips64el-linux") ''
sed -i s/-Werror// src/Makefile.am
''}
'';
buildInputs = [ check pam ];
nativeBuildInputs = [ autoreconfHook pkgconfig flex ];
makeFlags = [ "setowner=" ];
meta = with stdenv.lib; {
homepage = ftp://ftp.altlinux.org/pub/people/legion/kbd/;
description = "Linux keyboard utilities and keyboard maps";
platforms = platforms.linux;
licenses = licenses.gpl2Plus;
};
}