13 buildPythonPackage rec {
18 src = fetchFromGitHub {
21 rev = "refs/tags/${version}";
22 hash = "sha256-pa3majZ68+DQGtgGCpZVRshof+w9jvpxreo4dkckLXk=";
27 substituteInPlace src/c/pyeclib_c/pyeclib_c.c \
28 --replace-fail "liberasurecode.so" "${liberasurecode}/lib/liberasurecode.so"
30 # python's platform.platform() doesn't return "Darwin" (anymore?)
31 substituteInPlace setup.py \
32 --replace-fail '"Darwin"' '"macOS"'
42 ldLibraryPathEnvName =
43 if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
46 # required for the custom _find_library function in setup.py
47 export ${ldLibraryPathEnvName}="${lib.makeLibraryPath [ liberasurecode ]}"
50 dependencies = [ liberasurecode ];
57 pythonImportsCheck = [ "pyeclib" ];
60 description = "This library provides a simple Python interface for implementing erasure codes";
61 homepage = "https://github.com/openstack/pyeclib";
62 license = licenses.bsd2;
63 maintainers = teams.openstack.members;