Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{ lib, buildPythonPackage, fetchPypi, libusbsio, setuptools,}:
buildPythonPackage (finalAttrs: { pname = "libusbsio"; # If the versions come back into sync switch back to inheriting from c lib # inherit (libusbsio) version; version = "2.2.1"; pyproject = true;
src = fetchPypi { inherit (finalAttrs) pname version; hash = "sha256-ZccYDX93F2cNjDwyDxo/RdXHO7E8ZXZ5D8GngY44AlQ="; };
# The source includes both the python module directly and also prebuilt binaries # Delete the binaries and patch the wrapper to use binary from Nixpkgs instead postPatch = '' rm -rf libusbsio/bin substituteInPlace libusbsio/libusbsio.py \ --replace-fail \ "dllpath = LIBUSBSIO._lookup_dll_path(dfltdir, dllname)" \ 'dllpath = "${lib.getLib libusbsio}/lib/" + dllname' '';
build-system = [ setuptools ];
buildInputs = [ libusbsio ];
doCheck = false; # they require a device to be connected over USB
pythonImportsCheck = [ "libusbsio" ];
meta = { description = "LIBUSBSIO Host Library for USB Enabled MCUs"; homepage = "https://www.nxp.com/design/design-center/software/development-software/libusbsio-host-library-for-usb-enabled-mcus:LIBUSBSIO"; license = lib.licenses.bsd3; maintainers = [ ]; };})