nixpkgs/pkgs/development/libraries/gusb/default.nix

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

52 lines
1.3 KiB
Nix
Raw Normal View History

2021-08-11 14:47:09 +00:00
{ lib, stdenv, fetchurl, substituteAll, meson, ninja, pkg-config, gettext, gobject-introspection
2020-09-20 14:24:43 +00:00
, gtk-doc, docbook_xsl, docbook_xml_dtd_412, docbook_xml_dtd_44, python3
2018-10-26 18:54:43 +00:00
, glib, systemd, libusb1, vala, hwdata
2013-05-10 17:17:36 +00:00
}:
2020-09-20 14:24:43 +00:00
let
2022-08-06 22:48:42 +00:00
pythonEnv = python3.pythonForBuild.withPackages(ps: with ps; [
2020-09-20 14:24:43 +00:00
setuptools
]);
in
2015-01-14 12:36:45 +00:00
stdenv.mkDerivation rec {
pname = "gusb";
version = "0.3.10";
2018-10-26 18:54:43 +00:00
outputs = [ "bin" "out" "dev" "devdoc" ];
2013-05-10 17:17:36 +00:00
2015-01-14 12:36:45 +00:00
src = fetchurl {
2017-10-03 01:15:55 +00:00
url = "https://people.freedesktop.org/~hughsient/releases/libgusb-${version}.tar.xz";
sha256 = "sha256-DrC5qw+LugxZYxyAnDe2Fu806zyOAAsLm3HPEeSTG9w=";
2013-05-10 17:17:36 +00:00
};
2021-08-11 14:47:09 +00:00
patches = [
(substituteAll {
src = ./fix-python-path.patch;
python = "${pythonEnv}/bin/python3";
})
];
2018-10-26 18:54:43 +00:00
nativeBuildInputs = [
meson ninja pkg-config gettext pythonEnv
2018-10-26 18:54:43 +00:00
gtk-doc docbook_xsl docbook_xml_dtd_412 docbook_xml_dtd_44
gobject-introspection vala
2018-10-26 18:54:43 +00:00
];
buildInputs = [ systemd glib ];
2013-05-10 17:17:36 +00:00
2017-02-27 13:30:20 +00:00
propagatedBuildInputs = [ libusb1 ];
2018-10-26 18:54:43 +00:00
mesonFlags = [
"-Dusb_ids=${hwdata}/share/hwdata/usb.ids"
];
doCheck = false; # tests try to access USB
meta = with lib; {
2013-05-10 17:17:36 +00:00
description = "GLib libusb wrapper";
homepage = "https://github.com/hughsie/libgusb";
2018-10-26 18:54:43 +00:00
license = licenses.lgpl21;
maintainers = [ maintainers.marcweber ];
platforms = platforms.unix;
2013-05-10 17:17:36 +00:00
};
}