9 buildPythonPackage rec {
12 format = "setuptools";
14 src = fetchFromGitHub {
15 owner = "NaturalHistoryMuseum";
18 hash = "sha256-vNWzhO4V0mj4eItZ0Z5UG9RBCqprIcgMGNyIe1+mXWY=";
23 # """Loads the libdmtx shared library.
27 # return cdll.LoadLibrary("/nix/store/.../lib/libdmtx.so")
28 # """Loads the libdmtx shared library.
30 sed -i '\#def load.*#a\ return cdll.LoadLibrary("${libdmtx}/lib/libdmtx.so")' \
31 pylibdmtx/dmtx_library.py
33 # Checks that the loader works in various scenarios, but we just
34 # forced it to only work one way.
35 rm pylibdmtx/tests/test_dmtx_library.py
38 propagatedBuildInputs = [ pillow numpy ];
40 pythonImportsCheck = [ "pylibdmtx" ];
43 description = "Read and write Data Matrix barcodes from Python 2 and 3 using the libdmtx library";
44 homepage = "https://github.com/NaturalHistoryMuseum/pylibdmtx/";
45 license = licenses.mit;
46 maintainers = with maintainers; [ grahamc ];