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

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

88 lines
2.2 KiB
Nix
Raw Normal View History

{ fetchFromGitHub
, lib
, gobject-introspection
, gtk3
, python3Packages
, wrapGAppsHook3
, gdk-pixbuf
, libappindicator
, librsvg
}:
2021-05-10 11:07:45 +03:00
# Although we copy in the udev rules here, you probably just want to use
# `logitech-udev-rules`, which is an alias to `udev` output of this derivation,
# instead of adding this to `services.udev.packages` on NixOS,
python3Packages.buildPythonApplication rec {
pname = "solaar";
2024-05-12 05:43:00 +03:00
version = "1.1.13";
2021-05-10 11:07:45 +03:00
src = fetchFromGitHub {
owner = "pwr-Solaar";
repo = "Solaar";
2022-09-15 14:20:52 +03:00
rev = "refs/tags/${version}";
2024-05-12 05:43:00 +03:00
hash = "sha256-sYJrVAeZi0a7yD0i/zIIxcu9X/c5HvgoI/n50eXD47s=";
2016-01-08 03:08:43 +03:00
};
outputs = [ "out" "udev" ];
2022-08-06 00:31:11 +03:00
nativeBuildInputs = [
gdk-pixbuf
gobject-introspection
wrapGAppsHook3
2022-08-06 00:31:11 +03:00
];
buildInputs = [
libappindicator
librsvg
];
2021-05-10 11:07:45 +03:00
propagatedBuildInputs = with python3Packages; [
2022-04-27 10:52:47 +03:00
evdev
2023-11-07 19:08:51 +03:00
dbus-python
2021-05-10 11:07:45 +03:00
gtk3
2023-11-07 19:08:51 +03:00
hid-parser
2021-05-10 11:07:45 +03:00
psutil
pygobject3
pyudev
pyyaml
xlib
];
2019-03-11 08:08:25 +03:00
2021-05-10 11:07:45 +03: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 03:08:43 +03:00
postInstall = ''
2021-05-10 11:07:45 +03:00
ln -s $out/bin/solaar $out/bin/solaar-cli
install -Dm444 -t $udev/etc/udev/rules.d rules.d-uinput/*.rules
2016-01-08 03:08:43 +03:00
'';
2022-08-06 00:31:11 +03:00
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
# no tests
doCheck = false;
pythonImportsCheck = [ "solaar" ];
2019-03-11 08:08:25 +03:00
meta = with lib; {
2016-01-08 03:08:43 +03:00
description = "Linux devices manager for the Logitech Unifying Receiver";
longDescription = ''
2021-05-10 11:07:45 +03: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 03:08:43 +03:00
2021-05-10 11:07:45 +03:00
Solaar can be used as a GUI application or via its command-line interface.
2016-01-08 03:08:43 +03:00
2021-05-10 11:07:45 +03: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 03:08:43 +03:00
'';
homepage = "https://pwr-solaar.github.io/Solaar/";
2021-05-10 11:07:45 +03:00
license = licenses.gpl2Only;
maintainers = with maintainers; [ spinus ysndr oxalica ];
2021-05-10 11:07:45 +03:00
platforms = platforms.linux;
2016-01-08 03:08:43 +03:00
};
}