ykush: init at 1.2.5 (#469647)

This commit is contained in:
Aleksana
2025-12-16 14:03:13 +00:00
committed by GitHub
3 changed files with 77 additions and 0 deletions
+7
View File
@@ -14211,6 +14211,13 @@
githubId = 9920871;
name = "Monotoko";
};
ktemkin = {
email = "kate@ktemk.in";
github = "ktemkin";
githubId = 1298105;
name = "Kate Temkin";
matrix = "@ktemkin:katesiria.org";
};
ktf = {
email = "giulio.eulisse@cern.ch";
github = "ktf";
+14
View File
@@ -0,0 +1,14 @@
# Yepkit YKUSH3.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f11b", MODE="0666"
# Yepkit YKUSH2.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="efed", MODE="0666"
# Yepkit YKUSHXs
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f0cd", MODE="0666"
# Yepkit YKUSH(1).
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="f2f7", MODE="0666"
# Yepkit YKUSH-legacy.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="0042", MODE="0666"
+56
View File
@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
libusb1,
runCommand,
versionCheckHook,
}:
stdenv.mkDerivation (final: {
pname = "ykushcmd";
version = "1.2.5";
buildInputs = [ libusb1 ];
src = fetchFromGitHub {
owner = "yepkit";
repo = "ykush";
tag = "${final.version}";
hash = "sha256-FbqlXh8A5hzpthBE3jZ1LLOMs4WcEGke3sOZi9vmZF8=";
};
installPhase = ''
runHook preInstall
install -D bin/ykushcmd $out/bin/ykushcmd
install -Dm444 ${./99-ykush.rules} $out/lib/udev/rules.d/99_ykush.rules
runHook postInstall
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.tests = {
# We can't run any actual tests without hardware, but we can at least check the binary.
run-only = runCommand "${final.pname}-test" ''
${final}/bin/ykushcmd -h | grep YKUSHCMD
'';
};
meta = {
description = "Control utility for YepKit USB hubs";
longDescription = ''
controls the features of YepKit USB hubs, allowing one to arbitrarily
turn ports on and off and otherwise control the hub.
'';
homepage = "https://github.com/Yepkit/ykush";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
aiyion
ktemkin
];
mainProgram = "ykushcmd";
platforms = lib.platforms.linux;
};
})