1 { lib, buildPythonPackage, libusbsio }:
3 buildPythonPackage rec {
5 inherit (libusbsio) version;
7 src = "${libusbsio.src}/python";
9 # The source includes both the python module directly and also a source tarball for it.
10 # The direct files lack setup information, the tarball includes unwanted binaries.
11 # This takes only the setup files from the tarball.
13 tar -C python --strip-components=1 -xf python/dist/libusbsio-${version}.tar.gz libusbsio-${version}/{setup.py,setup.cfg,pyproject.toml}
18 substituteInPlace libusbsio/libusbsio.py \
19 --replace "dllpath = LIBUSBSIO._lookup_dll_path(dfltdir, dllname)" 'dllpath = "${libusbsio}/lib/" + dllname'
22 buildInputs = [ libusbsio ];
24 doCheck = false; # they require a device to be connected over USB
26 pythonImportsCheck = [ "libusbsio" ];
29 description = "NXP Secure Provisioning SDK";
30 homepage = "https://github.com/NXPmicro/spsdk";
31 license = licenses.bsd3;
32 maintainers = with maintainers; [ frogamic sbruder ];