11 url = "https://github.com/keyboardio/chrysalis/releases/download/v${version}/chrysalis-${version}-x64.AppImage";
12 hash = "sha512-F6Y87rgIclj1OA3gVX/gqqp9AvXKQlBXrbqk/26F1KHPF9NzHJgVmeszSo3Nhb6xg4CzWmzkqc8IW2H/Bg57kw==";
14 appimageContents = appimageTools.extract { inherit pname version src; };
16 appimageTools.wrapType2 {
17 inherit pname version src;
19 extraPkgs = pkgs: [ pkgs.glib ];
21 # Also expose the udev rules here, so it can be used as:
22 # services.udev.packages = [ pkgs.chrysalis ];
23 # to allow non-root modifications to the keyboards.
25 extraInstallCommands = ''
27 -D ${appimageContents}/usr/lib/chrysalis/resources/static/udev/60-kaleidoscope.rules \
28 -t $out/lib/udev/rules.d
31 -D ${appimageContents}/Chrysalis.desktop \
32 -t $out/share/applications
34 $out/share/applications/Chrysalis.desktop \
35 --replace-fail 'Exec=Chrysalis' 'Exec=${pname}'
37 install -Dm444 ${appimageContents}/usr/share/icons/hicolor/256x256/chrysalis.png -t $out/share/pixmaps
40 passthru.updateScript = ./update.sh;
43 description = "Graphical configurator for Kaleidoscope-powered keyboards";
44 homepage = "https://github.com/keyboardio/Chrysalis";
45 license = lib.licenses.gpl3Only;
46 maintainers = with lib.maintainers; [
51 platforms = [ "x86_64-linux" ];
52 # buildFHSEnv will create a symlink in $out/bin/${pname}
54 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];