1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/pkgs/applications/misc/chrysalis/default.nix

47 lines
1.4 KiB
Nix
Raw Normal View History

2021-05-17 18:12:24 +01:00
{ lib, appimageTools, fetchurl, gtk3, gsettings-desktop-schemas }:
2020-11-03 13:58:14 +00:00
let
pname = "chrysalis";
2021-10-02 12:47:11 +01:00
version = "0.8.6";
2021-08-13 12:57:45 +01:00
in appimageTools.wrapAppImage rec {
2020-11-03 13:58:14 +00:00
name = "${pname}-${version}-binary";
2021-08-13 12:57:45 +01:00
src = appimageTools.extract {
inherit name;
src = fetchurl {
url = "https://github.com/keyboardio/${pname}/releases/download/v${version}/${pname}-${version}.AppImage";
2021-10-02 12:47:11 +01:00
sha256 = "17wv475w4m4fg6ky9wf7ygxm98nmsmydks14vh3an85xv0fhj8h9";
2021-08-13 12:57:45 +01:00
};
2020-11-03 13:58:14 +00:00
};
2021-05-17 18:12:24 +01:00
profile = ''
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
2020-11-03 13:58:14 +00:00
multiPkgs = null;
extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [
p.glib
];
2021-08-13 12:57:45 +01: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 13:58:14 +00: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" ];
};
}