2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
libdiscid,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "discid";
|
|
|
|
version = "1.2.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1fc6kvnqwaz9lrs2qgsp8wh0nabf49010r0r53wnsmpmafy315nd";
|
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase =
|
2024-06-05 15:53:02 +00:00
|
|
|
let
|
|
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
''
|
|
|
|
substituteInPlace discid/libdiscid.py \
|
|
|
|
--replace "_open_library(_LIB_NAME)" \
|
|
|
|
"_open_library('${libdiscid}/lib/libdiscid${extension}')"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python binding of libdiscid";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://python-discid.readthedocs.org/";
|
|
|
|
license = licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|