biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / soxr / default.nix
blob841ba83259f78df32d49109ce4d56f36b1311b1c
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   cython,
8   numpy,
9   oldest-supported-numpy,
10   setuptools,
11   setuptools-scm,
12   gnutar,
14   # native
15   libsoxr,
17   # tests
18   pytestCheckHook,
21 buildPythonPackage rec {
22   pname = "soxr";
23   version = "0.3.7";
24   format = "pyproject";
26   src = fetchFromGitHub {
27     owner = "dofuuz";
28     repo = "python-soxr";
29     rev = "refs/tags/v${version}";
30     fetchSubmodules = true;
31     hash = "sha256-HGtoMfMQ5/2iEIFtik7mCrSxFnLXkSSx2W8wBul0+jk=";
32   };
34   postPatch = ''
35     substituteInPlace setup.py \
36       --replace "SYS_LIBSOXR = False" "SYS_LIBSOXR = True"
37   '';
39   nativeBuildInputs = [
40     cython
41     gnutar
42     numpy
43     oldest-supported-numpy
44     setuptools
45     setuptools-scm
46   ];
48   buildInputs = [ libsoxr ];
50   pythonImportsCheck = [ "soxr" ];
52   nativeCheckInputs = [ pytestCheckHook ];
54   meta = with lib; {
55     description = "High quality, one-dimensional sample-rate conversion library";
56     homepage = "https://github.com/dofuuz/python-soxr/tree/main";
57     license = licenses.lgpl21Plus;
58     maintainers = with maintainers; [ hexa ];
59   };