2021-10-04 20:16:53 +01:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, python3Packages
|
|
|
|
, wrapGAppsHook
|
|
|
|
, gdk-pixbuf
|
|
|
|
, libappindicator
|
|
|
|
, librsvg
|
|
|
|
}:
|
2021-05-10 09:07:45 +01:00
|
|
|
|
|
|
|
# Although we copy in the udev rules here, you probably just want to use
|
|
|
|
# logitech-udev-rules instead of adding this to services.udev.packages on NixOS
|
2019-08-03 15:28:49 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "solaar";
|
2022-01-20 09:35:31 +00:00
|
|
|
version = "1.1.1";
|
2021-05-10 09:07:45 +01:00
|
|
|
|
2018-08-08 14:23:40 +01:00
|
|
|
src = fetchFromGitHub {
|
2019-08-03 15:28:49 +01:00
|
|
|
owner = "pwr-Solaar";
|
2018-08-08 14:23:40 +01:00
|
|
|
repo = "Solaar";
|
2020-11-01 22:39:49 +00:00
|
|
|
rev = version;
|
2022-01-20 09:35:31 +00:00
|
|
|
sha256 = "1yqxk6nfxc1xhk59qbz9m3wqkxv446g17pazvanpavriiysjzbrs";
|
2016-01-08 00:08:43 +00:00
|
|
|
};
|
|
|
|
|
2021-10-04 20:16:53 +01:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook gdk-pixbuf ];
|
|
|
|
buildInputs = [ libappindicator librsvg ];
|
|
|
|
|
2021-05-10 09:07:45 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
gobject-introspection
|
|
|
|
gtk3
|
|
|
|
psutil
|
|
|
|
pygobject3
|
|
|
|
pyudev
|
|
|
|
pyyaml
|
|
|
|
xlib
|
|
|
|
];
|
2019-03-11 05:08:25 +00:00
|
|
|
|
2021-05-10 09:07:45 +01:00
|
|
|
# the -cli symlink is just to maintain compabilility with older versions where
|
|
|
|
# there was a difference between the GUI and CLI versions.
|
2016-01-08 00:08:43 +00:00
|
|
|
postInstall = ''
|
2021-05-10 09:07:45 +01:00
|
|
|
ln -s $out/bin/solaar $out/bin/solaar-cli
|
|
|
|
|
|
|
|
install -Dm444 -t $out/etc/udev/rules.d rules.d/*.rules
|
2016-01-08 00:08:43 +00:00
|
|
|
'';
|
2016-01-30 00:42:57 +00:00
|
|
|
|
2021-05-10 09:07:45 +01:00
|
|
|
# No tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2019-03-11 05:08:25 +00:00
|
|
|
meta = with lib; {
|
2016-01-08 00:08:43 +00:00
|
|
|
description = "Linux devices manager for the Logitech Unifying Receiver";
|
|
|
|
longDescription = ''
|
2021-05-10 09:07:45 +01: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.
|
2016-01-08 00:08:43 +00:00
|
|
|
|
2021-05-10 09:07:45 +01:00
|
|
|
Solaar can be used as a GUI application or via its command-line interface.
|
2016-01-08 00:08:43 +00:00
|
|
|
|
2021-05-10 09:07:45 +01: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`.
|
2016-01-08 00:08:43 +00:00
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://pwr-solaar.github.io/Solaar/";
|
2021-05-10 09:07:45 +01:00
|
|
|
license = licenses.gpl2Only;
|
2019-03-11 05:08:25 +00:00
|
|
|
maintainers = with maintainers; [ spinus ysndr ];
|
2021-05-10 09:07:45 +01:00
|
|
|
platforms = platforms.linux;
|
2016-01-08 00:08:43 +00:00
|
|
|
};
|
|
|
|
}
|