nixpkgs/pkgs/applications/misc/keymapp/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

69 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchurl
, autoPatchelfHook
, wrapGAppsHook3
, libusb1
, webkitgtk
, gtk3
, writeShellScript
, 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.1.1";
src = fetchurl {
url = "https://oryx.nyc3.cdn.digitaloceanspaces.com/keymapp/keymapp-${version}.tar.gz";
hash = "sha256-tbRlJ65hHPBDwoXAXf++OdcW67RcqR1x1vfhbPCo1Ls=";
};
nativeBuildInputs = [
copyDesktopItems
autoPatchelfHook
wrapGAppsHook3
];
buildInputs = [
libusb1
webkitgtk
gtk3
];
sourceRoot = ".";
installPhase = ''
runHook preInstall
install -m755 -D keymapp "$out/bin/${pname}"
install -Dm644 icon.png "$out/share/pixmaps/${pname}.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;
};
}