1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# build-sytem
6, cython_3
7, numpy
8, setuptools
9, setuptools-scm
10, gnutar
11
12# native
13, libsoxr
14
15# tests
16, pytestCheckHook
17}:
18
19buildPythonPackage rec {
20 pname = "soxr";
21 version = "0.3.5";
22 format = "pyproject";
23
24 src = fetchFromGitHub {
25 owner = "dofuuz";
26 repo = "python-soxr";
27 rev = "refs/tags/v${version}";
28 fetchSubmodules = true;
29 hash = "sha256-q/K7XlqvDHAna+fqN6iiJ9wD8efsuwHiEfKjXS46jz8=";
30 };
31
32 SETUPTOOLS_SCM_PRETEND_VERSION = version;
33
34 nativeBuildInputs = [
35 cython_3
36 gnutar
37 numpy
38 setuptools
39 setuptools-scm
40 ];
41
42 pythonImportsCheck = [
43 "soxr"
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 ];
49
50 meta = with lib; {
51 description = "High quality, one-dimensional sample-rate conversion library";
52 homepage = "https://github.com/dofuuz/python-soxr/tree/main";
53 license = licenses.lgpl21Plus;
54 maintainers = with maintainers; [ hexa ];
55 };
56}