nixpkgs/pkgs/os-specific/linux/usbrelay/default.nix

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

39 lines
862 B
Nix
Raw Normal View History

2022-05-08 19:16:32 +00:00
{ stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }:
stdenv.mkDerivation (finalAttrs: {
2022-03-29 21:54:42 +00:00
pname = "usbrelay";
2023-09-30 21:41:10 +00:00
version = "1.2.1";
2022-03-29 21:54:42 +00:00
src = fetchFromGitHub {
owner = "darrylb123";
repo = "usbrelay";
rev = finalAttrs.version;
2023-09-30 21:41:10 +00:00
sha256 = "sha256-9jEiMmBEpqY4+nKh3H8N/JrLohp/7oPK3rPmRjp2gvc=";
2022-03-29 21:54:42 +00:00
};
2022-05-08 19:16:32 +00:00
nativeBuildInputs = [
installShellFiles
];
2022-03-29 21:54:42 +00:00
buildInputs = [
hidapi
];
makeFlags = [
"DIR_VERSION=${finalAttrs.version}"
2022-03-29 21:54:42 +00:00
"PREFIX=${placeholder "out"}"
2023-05-31 20:09:39 +00:00
"LDCONFIG=${stdenv.cc.libc.bin}/bin/ldconfig"
2022-03-29 21:54:42 +00:00
];
2022-05-08 19:16:32 +00:00
postInstall = ''
installManPage usbrelay.1
'';
2022-03-29 21:54:42 +00:00
meta = with lib; {
description = "Tool to control USB HID relays";
homepage = "https://github.com/darrylb123/usbrelay";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ wentasah ];
platforms = platforms.linux;
};
})