lol

python3Packages.soxr: 0.3.7 -> 0.5.0.post1

+51 -18
+16
pkgs/development/python-modules/soxr/cmake-nanobind.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index eb701aa..6cb4b02 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -32,6 +32,11 @@ find_package(Python 3.9 6 + REQUIRED COMPONENTS Interpreter Development.Module 7 + OPTIONAL_COMPONENTS Development.SABIModule) 8 + 9 + +execute_process( 10 + + COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir 11 + + OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE NB_DIR) 12 + +list(APPEND CMAKE_PREFIX_PATH "${NB_DIR}") 13 + + 14 + find_package(nanobind CONFIG REQUIRED) 15 + 16 + if (USE_SYSTEM_LIBSOXR)
+35 -18
pkgs/development/python-modules/soxr/default.nix
··· 2 2 lib, 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 + pythonOlder, 5 6 6 7 # build-system 7 - cython, 8 - numpy, 9 - oldest-supported-numpy, 8 + cmake, 9 + nanobind, 10 + ninja, 11 + scikit-build-core, 10 12 setuptools, 11 13 setuptools-scm, 12 - gnutar, 14 + typing-extensions, 13 15 14 - # native 16 + # native dependencies 15 17 libsoxr, 16 18 19 + # dependencies 20 + numpy, 21 + 17 22 # tests 18 23 pytestCheckHook, 19 24 }: 20 25 21 26 buildPythonPackage rec { 22 27 pname = "soxr"; 23 - version = "0.3.7"; 24 - format = "pyproject"; 28 + version = "0.5.0.post1"; 29 + pyproject = true; 25 30 26 31 src = fetchFromGitHub { 27 32 owner = "dofuuz"; 28 33 repo = "python-soxr"; 29 34 rev = "refs/tags/v${version}"; 30 35 fetchSubmodules = true; 31 - hash = "sha256-HGtoMfMQ5/2iEIFtik7mCrSxFnLXkSSx2W8wBul0+jk="; 36 + hash = "sha256-Fpayc+MOpDUCdpoyJaIqSbMzuO0jYb6UN5ARFaxxOHk="; 32 37 }; 33 38 34 - postPatch = '' 35 - substituteInPlace setup.py \ 36 - --replace "SYS_LIBSOXR = False" "SYS_LIBSOXR = True" 37 - ''; 39 + patches = [ ./cmake-nanobind.patch ]; 38 40 39 41 nativeBuildInputs = [ 40 - cython 41 - gnutar 42 - numpy 43 - oldest-supported-numpy 44 - setuptools 45 - setuptools-scm 42 + cmake 43 + ninja 44 + ]; 45 + 46 + dontUseCmakeConfigure = true; 47 + 48 + pypaBuildFlags = [ 49 + "--config=cmake.define.USE_SYSTEM_LIBSOXR=ON" 46 50 ]; 47 51 52 + build-system = 53 + [ 54 + scikit-build-core 55 + nanobind 56 + setuptools 57 + setuptools-scm 58 + ] 59 + ++ lib.optionals (pythonOlder "3.11") [ 60 + typing-extensions 61 + ]; 62 + 48 63 buildInputs = [ libsoxr ]; 64 + 65 + dependencies = [ numpy ]; 49 66 50 67 pythonImportsCheck = [ "soxr" ]; 51 68