2016-07-01 00:51:01 +00:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, gzip, bzip2, pkgconfig, flex, check, pam }:
|
2007-04-04 09:18:39 +00:00
|
|
|
|
2009-06-05 17:16:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-07-01 00:51:01 +00:00
|
|
|
name = "kbd-${version}";
|
|
|
|
version = "2.0.3";
|
2007-04-04 09:18:39 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-04-07 18:26:36 +00:00
|
|
|
url = "mirror://kernel/linux/utils/kbd/${name}.tar.xz";
|
2015-08-18 18:35:50 +00:00
|
|
|
sha256 = "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs";
|
2007-04-04 09:18:39 +00:00
|
|
|
};
|
|
|
|
|
2015-04-02 01:36:31 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-optional-progs"
|
|
|
|
"--enable-libkeymap"
|
|
|
|
"--disable-nls"
|
|
|
|
];
|
2015-03-09 01:14:19 +00:00
|
|
|
|
2016-07-01 00:51:01 +00:00
|
|
|
patches = [ ./console-fix.patch ./search-paths.patch ];
|
2015-04-07 18:26:36 +00:00
|
|
|
|
|
|
|
postPatch =
|
2012-07-24 17:10:53 +00:00
|
|
|
''
|
2016-07-01 00:51:24 +00:00
|
|
|
# Add Neo keymap subdirectory
|
2015-08-15 23:46:50 +00:00
|
|
|
sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am
|
2015-03-09 01:14:19 +00:00
|
|
|
|
2012-07-24 17:10:53 +00:00
|
|
|
# Fix the path to gzip/bzip2.
|
2015-04-02 01:36:31 +00:00
|
|
|
substituteInPlace src/libkeymap/findfile.c \
|
2012-07-24 17:10:53 +00:00
|
|
|
--replace gzip ${gzip}/bin/gzip \
|
2015-08-21 17:35:23 +00:00
|
|
|
--replace bzip2 ${bzip2.bin}/bin/bzip2 \
|
2015-01-30 13:22:09 +00:00
|
|
|
|
2012-07-24 17:10:53 +00:00
|
|
|
# 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
|
|
|
|
''}
|
|
|
|
'';
|
2010-01-29 21:30:09 +00:00
|
|
|
|
2016-07-01 00:51:01 +00:00
|
|
|
buildInputs = [ check pam ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig flex ];
|
2015-03-09 01:14:19 +00:00
|
|
|
|
2016-07-01 00:51:01 +00:00
|
|
|
makeFlags = [ "setowner=" ];
|
2010-01-18 10:19:11 +00:00
|
|
|
|
2016-07-01 00:51:01 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-01-18 10:19:11 +00:00
|
|
|
homepage = ftp://ftp.altlinux.org/pub/people/legion/kbd/;
|
|
|
|
description = "Linux keyboard utilities and keyboard maps";
|
2016-07-01 00:51:01 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
licenses = licenses.gpl2Plus;
|
2010-01-18 10:19:11 +00:00
|
|
|
};
|
2007-04-04 09:18:39 +00:00
|
|
|
}
|