nixexprs/usb-drivers-master.nix
Přemysl Eric Janouch af116224d4
Fix up usb-drivers
It still won't build on macOS, because of impure iconutils.
2024-12-04 18:26:48 +01:00

47 lines
755 B
Nix

{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "usb-drivers";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
help2man
] ++ lib.optionals stdenv.isDarwin [
librsvg
];
buildInputs = with pkgs; [
libusb1
hidapi
];
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="
];
doCheck = true;
meta = with pkgs.lib; {
description = "User space USB drivers";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}