2015-04-02 01:36:31 +00:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, gzip, bzip2, pkgconfig, check, pam }:
|
2007-04-04 09:18:39 +00:00
|
|
|
|
2009-06-05 17:16:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-04-02 01:36:31 +00:00
|
|
|
name = "kbd-2.0.2";
|
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";
|
|
|
|
sha256 = "04mrms12nm5sas0nxs94yrr3hz7gmqhnmfgb9ff34bh1jszxmzcx";
|
2007-04-04 09:18:39 +00:00
|
|
|
};
|
|
|
|
|
2015-01-30 13:22:09 +00: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 01:14:19 +00:00
|
|
|
neoSrc = fetchurl {
|
|
|
|
name = "neo.map";
|
|
|
|
url = "https://svn.neo-layout.org/linux/console/neo.map?r=2455";
|
|
|
|
sha256 = "1wlgp09wq84hml60hi4ls6d4zna7vhycyg40iipyh1279i91hsx7";
|
|
|
|
};
|
|
|
|
|
2015-04-02 01:36:31 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-optional-progs"
|
|
|
|
"--enable-libkeymap"
|
|
|
|
"--disable-nls"
|
|
|
|
];
|
2015-03-09 01:14:19 +00:00
|
|
|
|
2015-04-07 18:26:36 +00:00
|
|
|
patches = [ ./console-fix.patch ];
|
|
|
|
|
|
|
|
postPatch =
|
2012-07-24 17:10:53 +00:00
|
|
|
''
|
2015-03-09 01:14:19 +00: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 13:22:09 +00:00
|
|
|
# Add the dvp keyboard in the dvorak folder
|
|
|
|
${gzip}/bin/gzip -c -d ${dvpSrc} > data/keymaps/i386/dvorak/dvp.map
|
|
|
|
|
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 \
|
|
|
|
--replace bzip2 ${bzip2}/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
|
|
|
|
2015-04-02 01:36:31 +00:00
|
|
|
buildInputs = [ autoreconfHook pkgconfig check pam ];
|
2015-03-09 01:14:19 +00:00
|
|
|
|
2007-04-04 09:18:39 +00:00
|
|
|
makeFlags = "setowner= ";
|
2010-01-18 10:19:11 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = ftp://ftp.altlinux.org/pub/people/legion/kbd/;
|
|
|
|
description = "Linux keyboard utilities and keyboard maps";
|
2015-03-20 15:52:02 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2010-01-18 10:19:11 +00:00
|
|
|
};
|
2007-04-04 09:18:39 +00:00
|
|
|
}
|