2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, meson, ninja, pkgconfig, gettext, gobject-introspection
|
2020-11-12 09:05:59 +00:00
|
|
|
, gtk-doc, docbook_xsl, docbook_xml_dtd_412, docbook_xml_dtd_44, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib, systemd, libusb1, vala, hwdata
|
|
|
|
}:
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
pythonEnv = python3.withPackages(ps: with ps; [
|
|
|
|
setuptools
|
|
|
|
]);
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gusb";
|
2020-11-12 09:05:59 +00:00
|
|
|
version = "0.3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://people.freedesktop.org/~hughsient/releases/libgusb-${version}.tar.xz";
|
2020-11-12 09:05:59 +00:00
|
|
|
sha256 = "1pv5ivbwxb9anq2j34i68r8fgs8nwsi4hmss7h9v1i3wk7300ajv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-11-12 09:05:59 +00:00
|
|
|
meson ninja pkgconfig gettext pythonEnv
|
2020-04-24 23:36:52 +00:00
|
|
|
gtk-doc docbook_xsl docbook_xml_dtd_412 docbook_xml_dtd_44
|
|
|
|
gobject-introspection vala
|
|
|
|
];
|
|
|
|
buildInputs = [ systemd glib ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ libusb1 ];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dusb_ids=${hwdata}/share/hwdata/usb.ids"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false; # tests try to access USB
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "GLib libusb wrapper";
|
|
|
|
homepage = "https://github.com/hughsie/libgusb";
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = [ maintainers.marcweber ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|