mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-08 14:23:40 +00:00
59 lines
1.0 KiB
Nix
59 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
libdiscid,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
setuptools,
|
|
sphinxHook,
|
|
sphinx-autodoc-typehints,
|
|
sphinx-rtd-theme,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "discid";
|
|
version = "1.4.0";
|
|
pyproject = true;
|
|
|
|
outputs = [
|
|
"out"
|
|
"doc"
|
|
];
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-UP09tEXK60S593Y3d+1JaIw89GM9qZ00DCW5GUlrqLU=";
|
|
};
|
|
|
|
build-system = [
|
|
setuptools
|
|
];
|
|
|
|
patchPhase =
|
|
let
|
|
extension = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
in
|
|
''
|
|
substituteInPlace discid/libdiscid.py \
|
|
--replace "_open_library(_LIB_NAME)" \
|
|
"_open_library('${libdiscid}/lib/libdiscid${extension}')"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
sphinxHook
|
|
sphinx-autodoc-typehints
|
|
sphinx-rtd-theme
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
meta = {
|
|
description = "Python binding of libdiscid";
|
|
homepage = "https://python-discid.readthedocs.org/";
|
|
license = lib.licenses.lgpl3Plus;
|
|
};
|
|
}
|