2019-03-11 05:08:25 +00:00
|
|
|
|
{ fetchFromGitHub, lib, gobject-introspection, gtk3, python3Packages }:
|
|
|
|
|
# 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";
|
2020-05-25 04:43:48 +01:00
|
|
|
|
version = "1.0.2";
|
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";
|
2019-08-03 15:28:49 +01:00
|
|
|
|
rev = "${version}";
|
2020-05-25 04:43:48 +01:00
|
|
|
|
sha256 = "0k5z9dap6rawiafkg1x7zjx51ala7wra6j6lvc2nn0y8r79yp7a9";
|
2016-01-08 00:08:43 +00:00
|
|
|
|
};
|
|
|
|
|
|
2019-03-11 05:08:25 +00:00
|
|
|
|
propagatedBuildInputs = with python3Packages; [ gobject-introspection gtk3 pygobject3 pyudev ];
|
|
|
|
|
|
2016-01-08 00:08:43 +00:00
|
|
|
|
postInstall = ''
|
|
|
|
|
wrapProgram "$out/bin/solaar" \
|
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
|
|
|
|
|
wrapProgram "$out/bin/solaar-cli" \
|
|
|
|
|
--prefix PYTHONPATH : "$PYTHONPATH" \
|
|
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
|
2019-03-13 16:50:51 +00:00
|
|
|
|
|
2019-03-11 05:08:25 +00:00
|
|
|
|
install -Dm644 -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
|
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
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 = ''
|
|
|
|
|
Solaar is a Linux device manager for Logitech’s Unifying Receiver
|
|
|
|
|
peripherals. It is able to pair/unpair devices to the receiver, and for
|
|
|
|
|
most devices read battery status.
|
|
|
|
|
|
|
|
|
|
It comes in two flavors, command-line and GUI. Both are able to list the
|
|
|
|
|
devices paired to a Unifying Receiver, show detailed info for each
|
|
|
|
|
device, and also pair/unpair supported devices with the receiver.
|
|
|
|
|
|
|
|
|
|
To be able to use it, make sure you have access to /dev/hidraw* files.
|
|
|
|
|
'';
|
|
|
|
|
license = licenses.gpl2;
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://pwr-solaar.github.io/Solaar/";
|
2016-01-08 00:08:43 +00:00
|
|
|
|
platforms = platforms.linux;
|
2019-03-11 05:08:25 +00:00
|
|
|
|
maintainers = with maintainers; [ spinus ysndr ];
|
2016-01-08 00:08:43 +00:00
|
|
|
|
};
|
|
|
|
|
}
|