nixpkgs/pkgs/applications/misc/chrysalis/default.nix

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

43 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, appimageTools, fetchurl }:
2020-11-03 14:58:14 +01:00
let
pname = "chrysalis";
2022-10-27 22:11:39 +02:00
version = "0.12.0";
2021-08-13 13:57:45 +02:00
in appimageTools.wrapAppImage rec {
2020-11-03 14:58:14 +01:00
name = "${pname}-${version}-binary";
2021-08-13 13:57:45 +02:00
src = appimageTools.extract {
inherit name;
src = fetchurl {
url = "https://github.com/keyboardio/${pname}/releases/download/v${version}/${pname}-${version}.AppImage";
2022-10-27 22:11:39 +02:00
sha256 = "sha256-sQoEO1UII4Gbp7UbHCCyejsd94lkBbi93TH325EamFc=";
2021-08-13 13:57:45 +02:00
};
2020-11-03 14:58:14 +01:00
};
multiPkgs = null;
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
p.glib
];
2021-08-13 13:57:45 +02:00
# Also expose the udev rules here, so it can be used as:
# services.udev.packages = [ pkgs.chrysalis ];
# to allow non-root modifications to the keyboards.
extraInstallCommands = ''
mv $out/bin/${name} $out/bin/${pname}
mkdir -p $out/lib/udev/rules.d
ln -s \
--target-directory=$out/lib/udev/rules.d \
${src}/resources/static/udev/60-kaleidoscope.rules
'';
2020-11-03 14:58:14 +01:00
meta = with lib; {
description = "A graphical configurator for Kaleidoscope-powered keyboards";
homepage = "https://github.com/keyboardio/Chrysalis";
license = licenses.gpl3;
maintainers = with maintainers; [ aw ];
platforms = [ "x86_64-linux" ];
};
}