nixexprs/usb-drivers-master.nix

45 lines
706 B
Nix
Raw Normal View History

2023-07-05 00:42:08 +02:00
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "usb-drivers";
2023-07-05 00:42:08 +02:00
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
help2man
];
buildInputs = with pkgs; [
libusb
hidapi
2023-07-05 00:42:08 +02:00
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DSETUID="
];
2023-07-05 00:42:08 +02:00
doCheck = true;
meta = with pkgs.lib; {
description = "User space USB drivers";
2023-07-05 00:42:08 +02:00
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}