nixpkgs/pkgs/tools/misc/vial/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.2 KiB
Nix
Raw Normal View History

2021-07-08 15:52:33 +03:00
{ lib, fetchurl, appimageTools }:
let
name = "vial-${version}";
2023-08-20 17:50:39 +03:00
version = "0.7";
2021-07-08 15:52:33 +03:00
pname = "Vial";
src = fetchurl {
url = "https://github.com/vial-kb/vial-gui/releases/download/v${version}/${pname}-v${version}-x86_64.AppImage";
hash = "sha256-IvOjwboxc3KRKUMXW3dWoHMy8Oh7NGsu0GIJcLZ6WR8=";
2021-07-08 15:52:33 +03:00
};
appimageContents = appimageTools.extractType2 { inherit name src; };
in
appimageTools.wrapType2 {
inherit name src;
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
mkdir -p $out/etc/udev/rules.d/ # https://get.vial.today/getting-started/linux-udev.html
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666", TAG+="uaccess", TAG+="udev-acl"' > $out/etc/udev/rules.d/92-viia.rules
'';
meta = {
description = "An Open-source GUI and QMK fork for configuring your keyboard in real time";
2021-07-08 15:52:33 +03:00
homepage = "https://get.vial.today";
license = lib.licenses.gpl2Plus;
mainProgram = "vial";
maintainers = with lib.maintainers; [ kranzes ];
2021-07-08 15:52:33 +03:00
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
2021-07-08 15:52:33 +03:00
};
}