9 , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages
10 , gobject-introspection
22 pythonEnv = python3.pythonOnBuildForHost.withPackages (ps: with ps; [
26 stdenv.mkDerivation rec {
30 outputs = [ "bin" "out" "dev" ]
31 ++ lib.optionals withIntrospection [ "devdoc" ];
33 src = fetchFromGitHub {
36 rev = "refs/tags/${version}";
37 hash = "sha256-piIPNLc3deToyQaajXFvM+CKh9ni8mb0P3kb+2RoJOs=";
42 src = ./fix-python-path.patch;
43 python = "${pythonEnv}/bin/python3";
57 ] ++ lib.optionals withIntrospection [
63 # all required in gusb.pc
64 propagatedBuildInputs = [
71 (lib.mesonBool "docs" withIntrospection)
72 (lib.mesonBool "introspection" withIntrospection)
73 (lib.mesonBool "tests" doCheck)
74 (lib.mesonBool "vapi" withIntrospection)
75 (lib.mesonOption "usb_ids" "${hwdata}/share/hwdata/usb.ids")
82 doCheck = false; # tests try to access USB
85 # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
86 moveToOutput "share/doc" "$devdoc"
90 description = "GLib libusb wrapper";
91 mainProgram = "gusbcmd";
92 homepage = "https://github.com/hughsie/libgusb";
93 license = licenses.lgpl21;
94 maintainers = [ maintainers.marcweber ];
95 platforms = platforms.unix;