Skip to content

Commit 2a13cee

Browse files
authored
cynthion: make udev rules accessible (#436000)
2 parents 9d68cce + 1df0ced commit 2a13cee

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkgs/development/python-modules/cynthion/default.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
# tests
2525
pytestCheckHook,
26+
udevCheckHook,
2627
}:
2728
buildPythonPackage rec {
2829
pname = "cynthion";
@@ -44,6 +45,8 @@ buildPythonPackage rec {
4445
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
4546
'';
4647

48+
nativeBuildInputs = [ udevCheckHook ];
49+
4750
build-system = [
4851
setuptools
4952
];
@@ -72,6 +75,13 @@ buildPythonPackage rec {
7275

7376
pythonImportsCheck = [ "cynthion" ];
7477

78+
# Make udev rules available for NixOS option services.udev.packages
79+
postInstall = ''
80+
install -Dm444 \
81+
-t $out/lib/udev/rules.d \
82+
build/lib/cynthion/assets/54-cynthion.rules
83+
'';
84+
7585
meta = {
7686
description = "Python package and utilities for the Great Scott Gadgets Cynthion USB Test Instrument";
7787
homepage = "https://github.com/greatscottgadgets/cynthion";

0 commit comments

Comments
 (0)