1 { lib, appimageTools, fetchurl }:
6 name = "${pname}-${version}-binary";
9 "https://github.com/keyboardio/${pname}/releases/download/v${version}/${pname}-${version}-x64.AppImage";
11 "sha512-WuItdQ/hDxbZZ3zulHI74NUkuYfesV/31rA1gPakCFgX2hpPrmKzwUez2vqt4N5qrGyphrR0bcelUatGZhOn5A==";
13 appimageContents = appimageTools.extract { inherit name src; };
14 in appimageTools.wrapType2 rec {
15 inherit name pname src;
18 extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ p.glib ];
20 # Also expose the udev rules here, so it can be used as:
21 # services.udev.packages = [ pkgs.chrysalis ];
22 # to allow non-root modifications to the keyboards.
24 extraInstallCommands = ''
25 mv $out/bin/{${name},${pname}}
28 -D ${appimageContents}/usr/lib/chrysalis/resources/static/udev/60-kaleidoscope.rules \
29 -t $out/lib/udev/rules.d
32 -D ${appimageContents}/Chrysalis.desktop \
33 -t $out/share/applications
35 $out/share/applications/Chrysalis.desktop \
36 --replace 'Exec=Chrysalis' 'Exec=${pname}'
38 cp -r ${appimageContents}/usr/share/icons $out/share
42 description = "A graphical configurator for Kaleidoscope-powered keyboards";
43 homepage = "https://github.com/keyboardio/Chrysalis";
44 license = licenses.gpl3;
45 maintainers = with maintainers; [ aw ];
46 platforms = [ "x86_64-linux" ];