cynthion: make udev rules accessible

Copy udev rules to an output path searched by the NixOS option
services.udev.packages.
This commit is contained in:
Aidan Gauland
2025-08-23 10:00:54 +12:00
parent e160d701a5
commit 1df0ced67d
@@ -23,6 +23,7 @@
# tests
pytestCheckHook,
udevCheckHook,
}:
buildPythonPackage rec {
pname = "cynthion";
@@ -44,6 +45,8 @@ buildPythonPackage rec {
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
nativeBuildInputs = [ udevCheckHook ];
build-system = [
setuptools
];
@@ -72,6 +75,13 @@ buildPythonPackage rec {
pythonImportsCheck = [ "cynthion" ];
# Make udev rules available for NixOS option services.udev.packages
postInstall = ''
install -Dm444 \
-t $out/lib/udev/rules.d \
build/lib/cynthion/assets/54-cynthion.rules
'';
meta = {
description = "Python package and utilities for the Great Scott Gadgets Cynthion USB Test Instrument";
homepage = "https://github.com/greatscottgadgets/cynthion";