2015-03-09 02:14:19 +01:00
|
|
|
{ stdenv, fetchurl, autoconf, automake, libtool, gzip, bzip2 }:
|
2007-04-04 11:18:39 +02:00
|
|
|
|
2009-06-05 19:16:14 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2012-07-24 21:18:21 +02:00
|
|
|
name = "kbd-1.15.3";
|
2007-04-04 11:18:39 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-09-09 19:08:14 +02:00
|
|
|
url = "ftp://ftp.altlinux.org/pub/people/legion/kbd/${name}.tar.gz";
|
2012-07-24 21:18:21 +02:00
|
|
|
sha256 = "1vcl2791xshjdpi4w88iy87gkb7zv0dbvi83f98v30dvqc9mfl46";
|
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-01-30 14:22:09 +01:00
|
|
|
configureFlags = "--disable-nls";
|
2010-01-18 11:19:11 +01:00
|
|
|
|
2015-03-09 02:14:19 +01:00
|
|
|
preConfigure = ''
|
|
|
|
sh autogen.sh
|
|
|
|
'';
|
|
|
|
|
2012-07-24 19:10:53 +02:00
|
|
|
patchPhase =
|
|
|
|
''
|
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.
|
|
|
|
substituteInPlace src/findfile.c \
|
|
|
|
--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-03-09 02:14:19 +01:00
|
|
|
buildInputs = [ autoconf automake libtool ];
|
|
|
|
|
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
|
|
|
}
|