kbd: split keymaps into kbdKeymaps
This commit is contained in:
parent
6c11d9dd55
commit
c89843b604
@ -43,7 +43,7 @@ in
|
||||
|
||||
consolePackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
default = with pkgs.kbdKeymaps; [ dvp neo ];
|
||||
description = ''
|
||||
List of additional packages that provide console fonts, keymaps and
|
||||
other resources.
|
||||
|
@ -9,18 +9,6 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0ppv953gn2zylcagr4z6zg5y2x93dxrml29plypg6xgbq3hrv2bs";
|
||||
};
|
||||
|
||||
/* 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";
|
||||
};
|
||||
|
||||
neoSrc = fetchurl {
|
||||
name = "neo.map";
|
||||
url = "https://svn.neo-layout.org/linux/console/neo.map?r=2455";
|
||||
sha256 = "1wlgp09wq84hml60hi4ls6d4zna7vhycyg40iipyh1279i91hsx7";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--enable-optional-progs"
|
||||
"--enable-libkeymap"
|
||||
@ -31,13 +19,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch =
|
||||
''
|
||||
mkdir -p data/keymaps/i386/neo
|
||||
cat "$neoSrc" > data/keymaps/i386/neo/neo.map
|
||||
# Add Neo keymap subdirectory
|
||||
sed -i -e 's,^KEYMAPSUBDIRS *= *,&i386/neo ,' data/Makefile.am
|
||||
|
||||
# Add the dvp keyboard in the dvorak folder
|
||||
${gzip}/bin/gzip -c -d ${dvpSrc} > data/keymaps/i386/dvorak/dvp.map
|
||||
|
||||
# Fix the path to gzip/bzip2.
|
||||
substituteInPlace src/libkeymap/findfile.c \
|
||||
--replace gzip ${gzip}/bin/gzip \
|
||||
|
35
pkgs/os-specific/linux/kbd/keymaps.nix
Normal file
35
pkgs/os-specific/linux/kbd/keymaps.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ stdenv, lib, fetchurl, gzip }:
|
||||
|
||||
{
|
||||
dvp = stdenv.mkDerivation rec {
|
||||
name = "dvp-${version}";
|
||||
version = "1.2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://kaufmann.no/downloads/linux/dvp-${lib.replaceStrings ["."] ["_"] version}.map.gz";
|
||||
sha256 = "0e859211cfe16a18a3b9cbf2ca3e280a23a79b4e40b60d8d01d0fde7336b6d50";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gzip ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/share/keymaps/i386/dvorak
|
||||
gzip -c -d $src > $out/share/keymaps/i386/dvorak/dvp.map
|
||||
'';
|
||||
};
|
||||
|
||||
neo = stdenv.mkDerivation rec {
|
||||
name = "neo-${version}";
|
||||
version = "2476";
|
||||
|
||||
src = fetchurl {
|
||||
name = "neo.map";
|
||||
url = "https://svn.neo-layout.org/linux/console/neo.map?r=${version}";
|
||||
sha256 = "19mfrd31vzpsjiwc7pshxm0b0sz5dd17xrz6k079cy4im1vf0r4g";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
install -D $src $out/share/keymaps/i386/neo/neo.map
|
||||
'';
|
||||
};
|
||||
}
|
@ -10723,6 +10723,8 @@ in
|
||||
|
||||
kbd = callPackage ../os-specific/linux/kbd { };
|
||||
|
||||
kbdKeymaps = callPackage ../os-specific/linux/kbd/keymaps.nix { };
|
||||
|
||||
kbdlight = callPackage ../os-specific/linux/kbdlight { };
|
||||
|
||||
kmscon = callPackage ../os-specific/linux/kmscon { };
|
||||
|
Loading…
Reference in New Issue
Block a user