nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at haskell-updates 67 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitLab, 5 cmake, 6 nanobind, 7 ninja, 8 scikit-build-core, 9 setuptools, 10 numpy, 11 pytestCheckHook, 12 scipy, 13 pytest-xdist, 14}: 15 16buildPythonPackage rec { 17 pname = "ducc0"; 18 version = "0.40.0"; 19 pyproject = true; 20 21 src = fetchFromGitLab { 22 domain = "gitlab.mpcdf.mpg.de"; 23 owner = "mtr"; 24 repo = "ducc"; 25 tag = "ducc0_${lib.replaceStrings [ "." ] [ "_" ] version}"; 26 hash = "sha256-0QzCY9E79hRrLQwxrB6t04NUM6sDQmWIyl/y0H0R3ak="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml --replace-fail '"pybind11>=2.13.6", ' "" 31 ''; 32 33 env = { 34 DUCC0_USE_NANOBIND = ""; 35 DUCC0_OPTIMIZATION = "portable"; 36 }; 37 38 build-system = [ 39 cmake 40 nanobind 41 ninja 42 scikit-build-core 43 setuptools 44 ]; 45 dontUseCmakeConfigure = true; 46 dependencies = [ numpy ]; 47 48 nativeCheckInputs = [ 49 pytestCheckHook 50 scipy 51 pytest-xdist 52 ]; 53 enabledTestPaths = [ "python/test" ]; 54 pythonImportsCheck = [ "ducc0" ]; 55 56 postInstall = '' 57 mkdir -p $out/include 58 cp -r ${src}/src/ducc0 $out/include 59 ''; 60 61 meta = { 62 homepage = "https://gitlab.mpcdf.mpg.de/mtr/ducc"; 63 description = "Efficient algorithms for Fast Fourier transforms and more"; 64 license = lib.licenses.gpl2Plus; 65 maintainers = with lib.maintainers; [ parras ]; 66 }; 67}