about summary refs log tree commit diff
path: root/pkgs/by-name/ke
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ke')
-rw-r--r--pkgs/by-name/ke/keepass/package.nix6
-rw-r--r--pkgs/by-name/ke/keepassxc-go/package.nix8
-rw-r--r--pkgs/by-name/ke/keeweb/package.nix139
-rw-r--r--pkgs/by-name/ke/kermit-terminal/package.nix6
-rw-r--r--pkgs/by-name/ke/kernel-hardening-checker/package.nix2
-rw-r--r--pkgs/by-name/ke/keto/package.nix45
-rw-r--r--pkgs/by-name/ke/kew/package.nix2
-rw-r--r--pkgs/by-name/ke/key-rack/0001-fix-E0716.patch27
-rw-r--r--pkgs/by-name/ke/key-rack/package.nix70
-rw-r--r--pkgs/by-name/ke/keycard-cli/package.nix29
-rw-r--r--pkgs/by-name/ke/keycastr/package.nix37
-rwxr-xr-xpkgs/by-name/ke/keycastr/update.sh20
-rw-r--r--pkgs/by-name/ke/keydb/package.nix10
-rw-r--r--pkgs/by-name/ke/keym/package.nix34
-rw-r--r--pkgs/by-name/ke/keymapp/package.nix74
-rw-r--r--pkgs/by-name/ke/keypunch/package.nix64
16 files changed, 559 insertions, 14 deletions
diff --git a/pkgs/by-name/ke/keepass/package.nix b/pkgs/by-name/ke/keepass/package.nix
index 9b17ca09af8fa..45af2a1dc5778 100644
--- a/pkgs/by-name/ke/keepass/package.nix
+++ b/pkgs/by-name/ke/keepass/package.nix
@@ -5,11 +5,11 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "keepass";
-  version = "2.56";
+  version = "2.57";
 
   src = fetchurl {
     url = "mirror://sourceforge/keepass/KeePass-${finalAttrs.version}-Source.zip";
-    hash = "sha256-e6+z3M36LiS0/UonJOvD3q6+Ic31uMixL8DoML0UhEQ=";
+    hash = "sha256-emJ4QhhIaUowG4SAUzRK6hUendc/H6JH09Js2Ji9PQ0=";
   };
 
   sourceRoot = ".";
@@ -82,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: {
 
     xbuild /p:Configuration=Release
 
-    runHook postBuld
+    runHook postBuild
   '';
 
   outputFiles = [
diff --git a/pkgs/by-name/ke/keepassxc-go/package.nix b/pkgs/by-name/ke/keepassxc-go/package.nix
index 86fb02a25ca4b..06a80b652abf1 100644
--- a/pkgs/by-name/ke/keepassxc-go/package.nix
+++ b/pkgs/by-name/ke/keepassxc-go/package.nix
@@ -1,4 +1,5 @@
 { lib
+, stdenv
 , buildGoModule
 , fetchFromGitHub
 , installShellFiles
@@ -19,7 +20,12 @@ buildGoModule rec {
 
   vendorHash = "sha256-jscyNyVr+RDN1EaxIOc3aYCAVT+1eO/c+dxEsIorDIs=";
 
-  postInstall = ''
+  checkFlags = [
+    # Test tries to monkey-patch the stdlib, fails with permission denied error.
+    "-skip=TestKeystore"
+  ];
+
+  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
     local INSTALL="$out/bin/keepassxc-go"
     installShellCompletion --cmd keepassxc-go \
       --bash <($out/bin/keepassxc-go completion bash) \
diff --git a/pkgs/by-name/ke/keeweb/package.nix b/pkgs/by-name/ke/keeweb/package.nix
new file mode 100644
index 0000000000000..48b9a603d8417
--- /dev/null
+++ b/pkgs/by-name/ke/keeweb/package.nix
@@ -0,0 +1,139 @@
+{
+  lib,
+  libGL,
+  stdenv,
+  fetchurl,
+  undmg,
+  dpkg,
+  autoPatchelfHook,
+  wrapGAppsHook3,
+  alsa-lib,
+  at-spi2-atk,
+  gdk-pixbuf,
+  nss,
+  udev,
+  gnome-keyring,
+  mesa,
+  gtk3,
+  libusb1,
+  libsecret,
+  libappindicator,
+  xdotool,
+  libX11,
+  libXcomposite,
+  libXext,
+  libXrandr,
+  libXScrnSaver,
+  libXtst,
+  libxshmfence,
+}:
+let
+  pname = "keeweb";
+  version = "1.18.7";
+
+  srcs = {
+    x86_64-linux = fetchurl {
+      url = "https://github.com/keeweb/keeweb/releases/download/v${version}/KeeWeb-${version}.linux.x64.deb";
+      hash = "sha256-/U+vn5TLIU9/J6cRFjuAdyGzlwC04mp4L2X2ETp+ZSE=";
+    };
+    x86_64-darwin = fetchurl {
+      url = "https://github.com/keeweb/keeweb/releases/download/v${version}/KeeWeb-${version}.mac.x64.dmg";
+      hash = "sha256-+ZFGrrw0tZ7F6lb/3iBIyGD+tp1puVhkPv10hfp6ATU=";
+    };
+    aarch64-darwin = fetchurl {
+      url = "https://github.com/keeweb/keeweb/releases/download/v${version}/KeeWeb-${version}.mac.arm64.dmg";
+      hash = "sha256-bkhwsWYLkec16vMOfXUce7jfrmI9W2xHiZvU1asebK4=";
+    };
+  };
+  src =
+    srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  libraries = [
+    alsa-lib
+    at-spi2-atk
+    gdk-pixbuf
+    libGL
+    nss
+    udev
+    libX11
+    libXcomposite
+    libXext
+    libXrandr
+    libXScrnSaver
+    libXtst
+    libxshmfence
+    gnome-keyring
+    mesa
+    gtk3
+    libusb1
+    libsecret
+    libappindicator
+    xdotool
+  ];
+
+  meta = {
+    description = "Free cross-platform password manager compatible with KeePass";
+    mainProgram = "keeweb";
+    homepage = "https://keeweb.info/";
+    changelog = "https://github.com/keeweb/keeweb/blob/v${version}/release-notes.md";
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ sikmir ];
+    platforms = builtins.attrNames srcs;
+  };
+in
+if stdenv.hostPlatform.isDarwin then
+  stdenv.mkDerivation {
+    inherit
+      pname
+      version
+      src
+      meta
+      ;
+
+    nativeBuildInputs = [ undmg ];
+
+    sourceRoot = ".";
+
+    installPhase = ''
+      mkdir -p $out/Applications
+      cp -r *.app $out/Applications
+    '';
+  }
+else
+  stdenv.mkDerivation {
+    inherit
+      pname
+      version
+      src
+      meta
+      ;
+
+    nativeBuildInputs = [
+      autoPatchelfHook
+      wrapGAppsHook3
+    ];
+
+    buildInputs = libraries;
+
+    unpackPhase = ''
+      ${dpkg}/bin/dpkg-deb --fsys-tarfile $src | tar --extract
+    '';
+
+    installPhase = ''
+      runHook preInstall
+
+      mkdir -p $out/bin
+      cp -r usr/share $out/share
+
+      runHook postInstall
+    '';
+
+    postFixup = ''
+      makeWrapper $out/share/keeweb-desktop/keeweb $out/bin/keeweb \
+        --argv0 "keeweb" \
+        --add-flags "$out/share/keeweb-desktop/resources/app.asar" \
+        --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libraries}" \
+        ''${gappsWrapperArgs[@]}
+    '';
+  }
diff --git a/pkgs/by-name/ke/kermit-terminal/package.nix b/pkgs/by-name/ke/kermit-terminal/package.nix
index a0c0008917a46..82892b27d32d5 100644
--- a/pkgs/by-name/ke/kermit-terminal/package.nix
+++ b/pkgs/by-name/ke/kermit-terminal/package.nix
@@ -11,13 +11,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "kermit";
-  version = "3.8";
+  version = "4.0";
 
   src = fetchFromGitHub {
     owner = "orhun";
     repo = "kermit";
     rev = finalAttrs.version;
-    hash = "sha256-XPHF33Nu+H8OcQFwsuUOhDBDWKm8sh5B36sfROeSWPg=";
+    hash = "sha256-rhlUnRfyd7PmtMSyP+tiu+TxZNb/YyS0Yc5IkWft7/4=";
   };
 
   outputs = [ "out" "man" ];
@@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = {
     homepage = "https://github.com/orhun/kermit";
-    description = "A VTE-based, simple and froggy terminal emulator";
+    description = "VTE-based, simple and froggy terminal emulator";
     changelog = "https://github.com/orhun/kermit/releases/tag/${finalAttrs.version}";
     license = lib.licenses.gpl3Only;
     mainProgram = "kermit";
diff --git a/pkgs/by-name/ke/kernel-hardening-checker/package.nix b/pkgs/by-name/ke/kernel-hardening-checker/package.nix
index ef202db574dd0..345d65dd3598d 100644
--- a/pkgs/by-name/ke/kernel-hardening-checker/package.nix
+++ b/pkgs/by-name/ke/kernel-hardening-checker/package.nix
@@ -15,7 +15,7 @@ python3Packages.buildPythonApplication rec {
   };
 
   meta = with lib; {
-    description = "A tool for checking the security hardening options of the Linux kernel";
+    description = "Tool for checking the security hardening options of the Linux kernel";
     homepage = "https://github.com/a13xp0p0v/kernel-hardening-checker";
     license = licenses.gpl3Only;
     platforms = platforms.all;
diff --git a/pkgs/by-name/ke/keto/package.nix b/pkgs/by-name/ke/keto/package.nix
new file mode 100644
index 0000000000000..c85c5750a95ab
--- /dev/null
+++ b/pkgs/by-name/ke/keto/package.nix
@@ -0,0 +1,45 @@
+{
+  fetchFromGitHub,
+  buildGoModule,
+  lib,
+}:
+let
+  pname = "keto";
+  version = "0.13.0-alpha.0";
+  commit = "c75695837f170334b526359f28967aa33d61bce6";
+in
+buildGoModule {
+  inherit pname version commit;
+
+  src = fetchFromGitHub {
+    owner = "ory";
+    repo = "keto";
+    rev = "v${version}";
+    hash = "sha256-0yylaaXogN2HWXY8Tb7ScN4jdyeHecJ0gBYlVvcwaNE=";
+  };
+
+  vendorHash = "sha256-lgwV4Ysjmd9e850Rf5c0wSZtMW3U34/piwwG7dQEUV4=";
+
+  tags = [
+    "sqlite"
+    "json1"
+    "hsm"
+  ];
+
+  subPackages = [ "." ];
+
+  # Pass versioning information via ldflags
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/ory/keto/internal/driver/config.Version=${version}"
+    "-X github.com/ory/keto/internal/driver/config.Commit=${commit}"
+  ];
+
+  meta = {
+    description = "ORY Keto, the open source access control server";
+    homepage = "https://www.ory.sh/keto/";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ mrmebelman ];
+  };
+}
diff --git a/pkgs/by-name/ke/kew/package.nix b/pkgs/by-name/ke/kew/package.nix
index 54f3f6717bd3b..7cab080e0fe42 100644
--- a/pkgs/by-name/ke/kew/package.nix
+++ b/pkgs/by-name/ke/kew/package.nix
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
   ];
 
   meta = with lib; {
-    description = "A command-line music player for Linux";
+    description = "Command-line music player for Linux";
     homepage = "https://github.com/ravachol/kew";
     platforms = platforms.linux;
     license = licenses.gpl2Only;
diff --git a/pkgs/by-name/ke/key-rack/0001-fix-E0716.patch b/pkgs/by-name/ke/key-rack/0001-fix-E0716.patch
new file mode 100644
index 0000000000000..fcbc64ddd3ad2
--- /dev/null
+++ b/pkgs/by-name/ke/key-rack/0001-fix-E0716.patch
@@ -0,0 +1,27 @@
+From 0b1d9759c43629dcd3d3a6216ea47b09516a5d84 Mon Sep 17 00:00:00 2001
+From: seth <getchoo@tuta.io>
+Date: Sat, 6 Jul 2024 18:59:50 -0400
+Subject: [PATCH] fix E0716
+
+doesn't seem to have popped up in upstream's CI. maybe this is only an
+issue in rust versions < 1.79?
+---
+ src/data/item.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/data/item.rs b/src/data/item.rs
+index 43dcf6f..985be74 100644
+--- a/src/data/item.rs
++++ b/src/data/item.rs
+@@ -327,7 +327,7 @@ impl ItemSchema {
+             Self::Unknown(schema) => {
+                 let info = crate::utils::AppInfo::new(schema);
+                 if info.is_installed() {
+-                    &format!("{schema}-symbolic")
++                    return format!("{schema}-symbolic");
+                 } else {
+                     "dialog-password-symbolic"
+                 }
+-- 
+2.45.1
+
diff --git a/pkgs/by-name/ke/key-rack/package.nix b/pkgs/by-name/ke/key-rack/package.nix
new file mode 100644
index 0000000000000..dcb5ac1c82ff9
--- /dev/null
+++ b/pkgs/by-name/ke/key-rack/package.nix
@@ -0,0 +1,70 @@
+{
+  lib,
+  fetchFromGitLab,
+  stdenv,
+  rustPlatform,
+  cargo,
+  rustc,
+  libadwaita,
+  meson,
+  ninja,
+  nix-update-script,
+  pkg-config,
+  python3,
+  wrapGAppsHook4,
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "key-rack";
+  version = "0.4.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.gnome.org";
+    owner = "sophie-h";
+    repo = "key-rack";
+    rev = finalAttrs.version;
+    hash = "sha256-mthXtTlyrIChaKKwKosTsV1hK9OQ/zLScjrq6D3CRsg=";
+  };
+
+  patches = [ ./0001-fix-E0716.patch ];
+
+  postPatch = ''
+    patchShebangs --build build-aux/{checks.sh,read-manifest.py}
+  '';
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit (finalAttrs) src;
+    hash = "sha256-wCJTm0W+g3+O1t1fR4maqJoxpPM0NeJG7d54MMAH33c=";
+  };
+
+  nativeBuildInputs = [
+    cargo
+    rustc
+    meson
+    ninja
+    pkg-config
+    python3
+    rustPlatform.cargoSetupHook
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [ libadwaita ];
+
+  # Workaround for the gettext-sys issue
+  # https://github.com/Koka/gettext-rs/issues/114
+  env.NIX_CFLAGS_COMPILE = lib.optionalString (
+    stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16"
+  ) "-Wno-error=incompatible-function-pointer-types";
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = {
+    description = "View and edit your apps’ keys";
+    homepage = "https://gitlab.gnome.org/sophie-h/key-rack";
+    license = lib.licenses.gpl3Plus;
+    maintainers = with lib.maintainers; [ getchoo ];
+    mainProgram = "key-rack";
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/pkgs/by-name/ke/keycard-cli/package.nix b/pkgs/by-name/ke/keycard-cli/package.nix
new file mode 100644
index 0000000000000..1b815533d0abf
--- /dev/null
+++ b/pkgs/by-name/ke/keycard-cli/package.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, buildGoModule, fetchFromGitHub, pkg-config, pcsclite }:
+
+buildGoModule rec {
+  pname = "keycard-cli";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "status-im";
+    repo = pname;
+    rev = version;
+    hash = "sha256-K2XxajprpPjfIs8rrnf2coIEQjPnir9/U0fTvqV2++g=";
+  };
+
+  vendorHash = "sha256-3XzWOiZF2WNs2pdumYN9bphvBKY+rrjuT+wWhB2pwT0=";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ pcsclite ];
+
+  ldflags = [ "-s" "-w" "-X main.version=${version}" ];
+
+  meta = with lib; {
+    description = "Command line tool and shell to manage keycards";
+    mainProgram = "keycard-cli";
+    homepage = "https://keycard.status.im";
+    license = licenses.mpl20;
+    maintainers = [ maintainers.zimbatm ];
+    broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/keycard-cli.x86_64-darwin
+  };
+}
diff --git a/pkgs/by-name/ke/keycastr/package.nix b/pkgs/by-name/ke/keycastr/package.nix
new file mode 100644
index 0000000000000..5eca502af1470
--- /dev/null
+++ b/pkgs/by-name/ke/keycastr/package.nix
@@ -0,0 +1,37 @@
+{
+  stdenvNoCC,
+  lib,
+  fetchurl,
+  unzip,
+}:
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "keycastr";
+  version = "0.9.18";
+
+  src = fetchurl {
+    url = "https://github.com/keycastr/keycastr/releases/download/v${finalAttrs.version}/KeyCastr.app.zip";
+    hash = "sha256-q12c/W0yGoVL+wx+T/gaevx2P0Xwcv0a0FMv7bKfUnE=";
+  };
+
+  sourceRoot = ".";
+
+  nativeBuildInputs = [ unzip ];
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/Applications
+    cp -r KeyCastr.app $out/Applications/
+    runHook postInstall
+  '';
+
+  passthru.updateScript = ./update.sh;
+
+  meta = {
+    homepage = "https://github.com/keycastr/keycastr";
+    description = "Open-source keystroke visualizer";
+    license = lib.licenses.bsd3;
+    platforms = lib.platforms.darwin;
+    maintainers = with lib.maintainers; [ matteopacini ];
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+  };
+})
diff --git a/pkgs/by-name/ke/keycastr/update.sh b/pkgs/by-name/ke/keycastr/update.sh
new file mode 100755
index 0000000000000..b564ff9f52e06
--- /dev/null
+++ b/pkgs/by-name/ke/keycastr/update.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl jq gnused
+
+set -euo pipefail
+
+cd "$(dirname "$0")" || exit 1
+
+# Grab latest release version
+LATEST_VER="$(curl --fail -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/keycastr/keycastr/releases/latest" | jq -r '.tag_name' | sed 's/^v//')"
+CURRENT_VER="$(grep -oP 'version = "\K[^"]+' package.nix)"
+
+if [[ "$LATEST_VER" == "$CURRENT_VER" ]]; then
+    echo "keycastr is up-to-date"
+    exit 0
+fi
+
+HASH="$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/keycastr/keycastr/releases/download/v${LATEST_VER}/KeyCastr.app.zip")")"
+
+sed -i "s#hash = \".*\"#hash = \"$HASH\"#g" package.nix
+sed -i "s#version = \".*\";#version = \"$LATEST_VER\";#g" package.nix
diff --git a/pkgs/by-name/ke/keydb/package.nix b/pkgs/by-name/ke/keydb/package.nix
index 3be46ff770a09..265f8a884fcb6 100644
--- a/pkgs/by-name/ke/keydb/package.nix
+++ b/pkgs/by-name/ke/keydb/package.nix
@@ -48,18 +48,18 @@ stdenv.mkDerivation (finalAttrs: {
       "PREFIX=${placeholder "out"}"
       "AR=${stdenv.cc.targetPrefix}ar"
       "RANLIB=${stdenv.cc.targetPrefix}ranlib"
-      "USEASM=${if stdenv.isx86_64 then "true" else "false"}"
+      "USEASM=${if stdenv.hostPlatform.isx86_64 then "true" else "false"}"
     ]
     ++ lib.optionals (!tlsSupport) [ "BUILD_TLS=no" ]
     ++ lib.optionals withSystemd [ "USE_SYSTEMD=yes" ]
-    ++ lib.optionals (!stdenv.isx86_64) [ "MALLOC=libc" ];
+    ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ "MALLOC=libc" ];
 
   enableParallelBuilding = true;
 
-  hardeningEnable = lib.optionals (!stdenv.isDarwin) [ "pie" ];
+  hardeningEnable = lib.optionals (!stdenv.hostPlatform.isDarwin) [ "pie" ];
 
   # darwin currently lacks a pure `pgrep` which is extensively used here
-  doCheck = !stdenv.isDarwin;
+  doCheck = !stdenv.hostPlatform.isDarwin;
   nativeCheckInputs = [
     which
     tcl
@@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: {
 
   meta = {
     homepage = "https://keydb.dev";
-    description = "A Multithreaded Fork of Redis";
+    description = "Multithreaded Fork of Redis";
     license = lib.licenses.bsd3;
     platforms = lib.platforms.all;
     changelog = "https://github.com/Snapchat/KeyDB/raw/v${finalAttrs.version}/00-RELEASENOTES";
diff --git a/pkgs/by-name/ke/keym/package.nix b/pkgs/by-name/ke/keym/package.nix
new file mode 100644
index 0000000000000..387706b207cef
--- /dev/null
+++ b/pkgs/by-name/ke/keym/package.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, libX11
+, libXtst
+, libXi
+}:
+
+stdenv.mkDerivation {
+  pname = "keym";
+  version = "unstable-2022-07-10";
+
+  src = fetchFromGitHub {
+    owner = "cwkx";
+    repo = "keym";
+    rev = "67a6d39d45e17221353e06c39283b5636b46d25c";
+    hash = "sha256-v2eS7un2ABnpWBwuKq+0CeLX8ivtlNUjM2jRboKumOE=";
+  };
+
+  buildInputs = [ libX11 libXtst libXi ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/cwkx/keym";
+    description = "C tool to control mouse with keyboard for X11";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    mainProgram = "keym";
+    maintainers = with maintainers; [ CompileTime ];
+  };
+}
diff --git a/pkgs/by-name/ke/keymapp/package.nix b/pkgs/by-name/ke/keymapp/package.nix
new file mode 100644
index 0000000000000..5438236d1a7be
--- /dev/null
+++ b/pkgs/by-name/ke/keymapp/package.nix
@@ -0,0 +1,74 @@
+{
+  stdenv,
+  lib,
+  fetchurl,
+  autoPatchelfHook,
+  wrapGAppsHook4,
+  libusb1,
+  libsoup_3,
+  webkitgtk_4_1,
+  makeDesktopItem,
+  copyDesktopItems,
+}:
+let
+  desktopItem = makeDesktopItem {
+    name = "keymapp";
+    icon = "keymapp";
+    desktopName = "Keymapp";
+    categories = [
+      "Settings"
+      "HardwareSettings"
+    ];
+    type = "Application";
+    exec = "keymapp";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "keymapp";
+  version = "1.3.2";
+
+  src = fetchurl {
+    url = "https://oryx.nyc3.cdn.digitaloceanspaces.com/keymapp/keymapp-${version}.tar.gz";
+    hash = "sha256-9umi9QWWSG0W3w9d7eRwtZHUraqInkqJbE+Lkdn3TU8=";
+  };
+
+  nativeBuildInputs = [
+    copyDesktopItems
+    autoPatchelfHook
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [
+    libusb1
+    webkitgtk_4_1
+    libsoup_3
+  ];
+
+  sourceRoot = ".";
+
+  installPhase = ''
+    runHook preInstall
+
+    install -m755 -D keymapp "$out/bin/keymapp"
+    install -Dm644 icon.png "$out/share/pixmaps/keymapp.png"
+
+    runHook postInstall
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(--set-default '__NV_PRIME_RENDER_OFFLOAD' 1)
+  '';
+
+  desktopItems = [ desktopItem ];
+
+  meta = with lib; {
+    homepage = "https://www.zsa.io/flash/";
+    description = "Application for ZSA keyboards";
+    maintainers = with lib.maintainers; [
+      jankaifer
+      shawn8901
+    ];
+    platforms = platforms.linux;
+    license = lib.licenses.unfree;
+  };
+}
diff --git a/pkgs/by-name/ke/keypunch/package.nix b/pkgs/by-name/ke/keypunch/package.nix
new file mode 100644
index 0000000000000..420b7ff0de6a9
--- /dev/null
+++ b/pkgs/by-name/ke/keypunch/package.nix
@@ -0,0 +1,64 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  rustPlatform,
+  cargo,
+  rustc,
+  meson,
+  ninja,
+  pkg-config,
+  appstream,
+  blueprint-compiler,
+  desktop-file-utils,
+  gettext,
+  wrapGAppsHook4,
+  libadwaita,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "keypunch";
+  version = "3.1";
+
+  src = fetchFromGitHub {
+    owner = "bragefuglseth";
+    repo = "keypunch";
+    rev = "refs/tags/v${finalAttrs.version}";
+    hash = "sha256-2S5S7SvMYdEOOrF3SiwpbijsgHcSIyWEVJB41jbrn1A=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit (finalAttrs) pname version src;
+    hash = "sha256-sD+wy1D6nl333PxlDz73YtnfBEmDzb+kNZkZI8JbfSg=";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    rustPlatform.cargoSetupHook
+    cargo
+    rustc
+
+    meson
+    ninja
+
+    pkg-config
+    appstream
+    blueprint-compiler
+    desktop-file-utils
+    gettext
+
+    wrapGAppsHook4
+  ];
+
+  buildInputs = [ libadwaita ];
+
+  meta = {
+    description = "Practice your typing skills";
+    homepage = "https://github.com/bragefuglseth/keypunch";
+    license = lib.licenses.gpl3Plus;
+    mainProgram = "keypunch";
+    maintainers = with lib.maintainers; [ tomasajt ];
+    platforms = lib.platforms.linux;
+  };
+})