Add Logitech support

This commit is contained in:
2025-12-26 02:35:27 +01:00
parent 9efb59a966
commit d9b9d82231
7 changed files with 220 additions and 31 deletions

View File

@@ -17,7 +17,13 @@
};
};
outputs = { self, nixpkgs, czkawka-src, naersk }:
outputs =
{
self,
nixpkgs,
czkawka-src,
naersk,
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
@@ -42,7 +48,8 @@
# Optional: libadwaita if the master branch has switched to it
];
in {
in
{
packages.${system}.default = naersk-lib.buildPackage {
pname = "czkawka";
version = "master";
@@ -51,7 +58,7 @@
# Add the dependencies
inherit nativeBuildInputs buildInputs;
# We need to manually install the desktop files/icons because Naersk
# We need to manually install the desktop files/icons because Naersk
# only installs the binaries by default.
postInstall = ''
install -Dm444 -t $out/share/applications data/com.github.qarmin.czkawka.desktop
@@ -66,4 +73,4 @@
inherit nativeBuildInputs buildInputs;
};
};
}
}

View File

@@ -0,0 +1,77 @@
{
description = "Solaar built from GitHub master branch";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
# This input automatically tracks the latest commit on master
solaar-src = {
url = "github:pwr-Solaar/Solaar/master";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
flake-utils,
solaar-src,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pythonPackages = pkgs.python3Packages;
in
{
packages.default = pythonPackages.buildPythonApplication rec {
pname = "solaar";
version = "master-${solaar-src.shortRev or "dirty"}";
src = solaar-src;
# --- FIX STARTS HERE ---
# 1. Enable pyproject format
pyproject = true;
# 2. Add build tools (setuptools/wheel) to nativeBuildInputs
nativeBuildInputs =
with pkgs;
[
gobject-introspection
wrapGAppsHook3
pkg-config
]
++ (with pythonPackages; [
setuptools
wheel
]);
# --- FIX ENDS HERE ---
propagatedBuildInputs = with pythonPackages; [
pyudev
psutil
xlib
pyyaml
evdev
dbus-python
pygobject3
typing-extensions
pkgs.gtk3
pkgs.libnotify
pkgs.libayatana-appindicator
];
postInstall = ''
install -Dm644 rules.d/42-logitech-unify-permissions.rules \
$out/lib/udev/rules.d/42-logitech-unify-permissions.rules
'';
doCheck = false;
};
}
);
}