2015-04-02 03:36:31 +02:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, gzip, bzip2, pkgconfig, check, pam }:
|
2007-04-04 11:18:39 +02:00
|
|
|
|
2009-06-05 19:16:14 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-02 03:36:31 +02:00
|
|
|
name = "kbd-2.0.2";
|
2007-04-04 11:18:39 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-04-07 20:26:36 +02:00
|
|
|
url = "mirror://kernel/linux/utils/kbd/${name}.tar.xz";
|
|
|
|
sha256 = "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx";
|
2007-04-04 11:18:39 +02:00
|
|
|
};
|
|
|
|
|
2015-01-30 14:22:09 +01:00
|
|
|
/* Get the dvorak programmer keymap (present in X but not in kbd) */
|
|
|
|
dvpSrc = fetchurl {
|
|
|
|
url = "http://kaufmann.no/downloads/linux/dvp-1_2_1.map.gz";
|
|
|
|
sha256 = "0e859211cfe16a18a3b9cbf2ca3e280a23a79b4e40b60d8d01d0fde7336b6d50";
|
|
|
|
};
|
|
|
|
|
2015-03-09 02:14:19 +01:00
|
|
|
neoSrc = fetchurl {
|
|
|
|
name = "neo.map";
|
|
|
|
url = "https://svn.neo-layout.org/linux/console/neo.map?r=2455";
|
|
|
|
sha256 = "1wlgp09wq84hml60hi4ls6d4zna7vhycyg40iipyh1279i91hsx7";
|
|
|
|
};
|
|
|
|
|
2015-04-02 03:36:31 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-optional-progs"
|
|
|
|
"--enable-libkeymap"
|
|
|
|
"--disable-nls"
|
|
|
|
];
|
2015-03-09 02:14:19 +01:00
|
|
|
|
2015-04-07 20:26:36 +02:00
|
|
|
patches = [ ./console-fix.patch ];
|
|
|
|
|
|
|
|
postPatch =
|
2012-07-24 19:10:53 +02:00
|
|
|
''
|
2015-03-09 02:14:19 +01:00
|
|
|
mkdir -p data/keymaps/i386/neo
|
|
|
|
cat "$neoSrc" > data/keymaps/i386/neo/neo.map
|
|
|
|
sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.in
|
|
|
|
|
2015-01-30 14:22:09 +01:00
|
|
|
# Add the dvp keyboard in the dvorak folder
|
|
|
|
${gzip}/bin/gzip -c -d ${dvpSrc} > data/keymaps/i386/dvorak/dvp.map
|
|
|
|
|
2012-07-24 19:10:53 +02:00
|
|
|
# Fix the path to gzip/bzip2.
|
2015-04-02 03:36:31 +02:00
|
|
|
substituteInPlace src/libkeymap/findfile.c \
|
2012-07-24 19:10:53 +02:00
|
|
|
--replace gzip ${gzip}/bin/gzip \
|
|
|
|
--replace bzip2 ${bzip2}/bin/bzip2 \
|
2015-01-30 14:22:09 +01:00
|
|
|
|
2012-07-24 19:10:53 +02: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 22:30:09 +01:00
|
|
|
|
2015-04-02 03:36:31 +02:00
|
|
|
buildInputs = [ autoreconfHook pkgconfig check pam ];
|
2015-03-09 02:14:19 +01:00
|
|
|
|
2007-04-04 11:18:39 +02:00
|
|
|
makeFlags = "setowner= ";
|
2010-01-18 11:19:11 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = ftp://ftp.altlinux.org/pub/people/legion/kbd/;
|
|
|
|
description = "Linux keyboard utilities and keyboard maps";
|
2015-03-20 16:52:02 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-01-18 11:19:11 +01:00
|
|
|
};
|
2007-04-04 11:18:39 +02:00
|
|
|
}
|