diff --git a/default.nix b/default.nix index 857c830..e3f702d 100644 --- a/default.nix +++ b/default.nix @@ -17,6 +17,7 @@ diskgraph = pkgs.callPackage ./pkgs/diskgraph { }; freqtop = pkgs.callPackage ./pkgs/freqtop { }; map = pkgs.callPackage ./pkgs/map { }; + microsoft-ergonomic-keyboard = pkgs.callPackage ./pkgs/microsoft-ergonomic-keyboard { }; openscad-snapshot = pkgs.callPackage ./pkgs/openscad-snapshot { }; q = pkgs.callPackage ./pkgs/q { }; # TODO: fix dependency specification diff --git a/pkgs/microsoft-ergonomic-keyboard/default.nix b/pkgs/microsoft-ergonomic-keyboard/default.nix new file mode 100644 index 0000000..8b17333 --- /dev/null +++ b/pkgs/microsoft-ergonomic-keyboard/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, fetchFromGitLab, kernel, kmod }: + +stdenv.mkDerivation rec { + name = "microsoft-ergonomic-keyboard-${version}-${kernel.version}"; + version = "1.0"; + + src = fetchFromGitLab { + owner = "arnekeller"; + repo = "microsoft-ergonomic-keyboard"; + rev = "f23be31228daa7ce62f019acb8f7a127e5bd846c"; + sha256 = "0knjkx4bqjxqsm2wly3dj96w1ljzhxavs26a3m65bb04phcb2n8w"; + }; + + hardeningDisable = [ "pic" "format" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = [ + "KERNELRELEASE=${kernel.modDirVersion}" + "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=$(out)" + ]; + + meta = with lib; { + description = "A kernel module to fix the office key on MS ergonomic keyboards"; + homepage = "https://gitlab.com/arnekeller/microsoft-ergonomic-keyboard"; + license = licenses.gpl2Only; + maintainers = [ maintainers.fliegendewurst ]; + platforms = platforms.linux; + }; +} +