Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 2.6 kB view raw
1{ lib 2, anytree 3, buildPythonPackage 4, cached-property 5, cgen 6, click 7, codepy 8, distributed 9, fetchFromGitHub 10, gcc 11, llvmPackages 12, matplotlib 13, multidict 14, nbval 15, psutil 16, py-cpuinfo 17, pyrevolve 18, pytest-xdist 19, pytestCheckHook 20, pythonOlder 21, scipy 22, stdenv 23, sympy 24}: 25 26buildPythonPackage rec { 27 pname = "devito"; 28 version = "4.8.1"; 29 format = "setuptools"; 30 31 disabled = pythonOlder "3.7"; 32 33 src = fetchFromGitHub { 34 owner = "devitocodes"; 35 repo = "devito"; 36 rev = "refs/tags/v${version}"; 37 hash = "sha256-LzqY//205XEOd3/f8k1g4OYndRHMTVplBogGJf5Forw="; 38 }; 39 40 postPatch = '' 41 # Removing unecessary dependencies 42 sed -e "s/flake8.*//g" \ 43 -e "s/codecov.*//g" \ 44 -e "s/pytest.*//g" \ 45 -e "s/pytest-runner.*//g" \ 46 -e "s/pytest-cov.*//g" \ 47 -i requirements.txt 48 49 # Relaxing dependencies requirements 50 sed -e "s/>.*//g" \ 51 -e "s/<.*//g" \ 52 -i requirements.txt 53 ''; 54 55 propagatedBuildInputs = [ 56 anytree 57 cached-property 58 cgen 59 click 60 codepy 61 distributed 62 nbval 63 multidict 64 psutil 65 py-cpuinfo 66 pyrevolve 67 scipy 68 sympy 69 ] ++ lib.optionals stdenv.cc.isClang [ 70 llvmPackages.openmp 71 ]; 72 73 nativeCheckInputs = [ 74 pytestCheckHook 75 pytest-xdist 76 matplotlib 77 gcc 78 ]; 79 80 # I've had to disable the following tests since they fail while using nix-build, but they do pass 81 # outside the build. They mostly related to the usage of MPI in a sandboxed environment. 82 disabledTests = [ 83 "test_assign_parallel" 84 "test_gs_parallel" 85 "test_if_parallel" 86 "test_if_halo_mpi" 87 "test_cache_blocking_structure_distributed" 88 "test_mpi" 89 "test_codegen_quality0" 90 "test_new_distributor" 91 "test_subdomainset_mpi" 92 "test_init_omp_env_w_mpi" 93 "test_mpi_nocomms" 94 "test_shortcuts" 95 "est_docstrings" 96 "test_docstrings[finite_differences.coefficients]" 97 "test_coefficients_w_xreplace" 98 "test_loop_bounds_forward" 99 ]; 100 101 disabledTestPaths = [ 102 "tests/test_pickle.py" 103 "tests/test_benchmark.py" 104 "tests/test_mpi.py" 105 "tests/test_autotuner.py" 106 "tests/test_data.py" 107 "tests/test_dse.py" 108 "tests/test_gradient.py" 109 ]; 110 111 pythonImportsCheck = [ 112 "devito" 113 ]; 114 115 meta = with lib; { 116 description = "Code generation framework for automated finite difference computation"; 117 homepage = "https://www.devitoproject.org/"; 118 changelog = "https://github.com/devitocodes/devito/releases/tag/v${version}"; 119 license = licenses.mit; 120 maintainers = with maintainers; [ atila ]; 121 }; 122}