2021-10-06 13:57:05 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, python3Packages
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gdk-pixbuf
|
|
|
|
, libappindicator
|
|
|
|
, librsvg
|
|
|
|
}:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
# Although we copy in the udev rules here, you probably just want to use
|
2022-07-18 16:21:45 +00:00
|
|
|
# `logitech-udev-rules`, which is an alias to `udev` output of this derivation,
|
|
|
|
# instead of adding this to `services.udev.packages` on NixOS,
|
2020-04-24 23:36:52 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "solaar";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "1.1.4";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pwr-Solaar";
|
|
|
|
repo = "Solaar";
|
2020-11-03 02:18:15 +00:00
|
|
|
rev = version;
|
2022-07-18 16:21:45 +00:00
|
|
|
hash = "sha256-nDfVF7g0M54DRpkH1rnZB8o+nCV4A6b1uKMOMRQ3GbI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
outputs = [ "out" "udev" ];
|
|
|
|
|
2021-10-06 13:57:05 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook gdk-pixbuf ];
|
|
|
|
buildInputs = [ libappindicator librsvg ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2022-04-27 09:35:20 +00:00
|
|
|
evdev
|
2021-05-20 23:08:51 +00:00
|
|
|
gobject-introspection
|
|
|
|
gtk3
|
|
|
|
psutil
|
|
|
|
pygobject3
|
|
|
|
pyudev
|
|
|
|
pyyaml
|
|
|
|
xlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# the -cli symlink is just to maintain compabilility with older versions where
|
|
|
|
# there was a difference between the GUI and CLI versions.
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
ln -s $out/bin/solaar $out/bin/solaar-cli
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
install -Dm444 -t $udev/etc/udev/rules.d rules.d-uinput/*.rules
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Linux devices manager for the Logitech Unifying Receiver";
|
|
|
|
longDescription = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
Solaar is a Linux manager for many Logitech keyboards, mice, and trackpads that
|
|
|
|
connect wirelessly to a USB Unifying, Lightspeed, or Nano receiver, connect
|
|
|
|
directly via a USB cable, or connect via Bluetooth. Solaar does not work with
|
|
|
|
peripherals from other companies.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
Solaar can be used as a GUI application or via its command-line interface.
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
This tool requires either to be run with root/sudo or alternatively to have the udev rules files installed. On NixOS this can be achieved by setting `hardware.logitech.wireless.enable`.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
homepage = "https://pwr-solaar.github.io/Solaar/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Only;
|
2022-07-18 16:21:45 +00:00
|
|
|
maintainers = with maintainers; [ spinus ysndr oxalica ];
|
2021-05-20 23:08:51 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|