nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 102 lines 2.2 kB view raw
1{ stdenv 2, lib 3, buildPythonPackage 4, fetchFromGitHub 5, anytree 6, nbval 7, sympy 8, scipy 9, cached-property 10, psutil 11, py-cpuinfo 12, cgen 13, click 14, multidict 15, distributed 16, pyrevolve 17, codepy 18, pytestCheckHook 19, matplotlib 20, pytest-xdist 21}: 22 23buildPythonPackage rec { 24 pname = "devito"; 25 version = "unstable-2022-04-22"; 26 27 src = fetchFromGitHub { 28 owner = "devitocodes"; 29 repo = "devito"; 30 rev = "7cb52eded4038c1a0ee92cfd04d3412c48f2fb7c"; 31 sha256 = "sha256-75hkkufQK9Nv65DBz8cmYTfkxH/UUWDQK/rGUDULvjM="; 32 }; 33 34 postPatch = '' 35 # Removing unecessary dependencies 36 sed -e "s/flake8.*//g" \ 37 -e "s/codecov.*//g" \ 38 -e "s/pytest.*//g" \ 39 -e "s/pytest-runner.*//g" \ 40 -e "s/pytest-cov.*//g" \ 41 -i requirements.txt 42 43 # Relaxing dependencies requirements 44 sed -e "s/>.*//g" \ 45 -e "s/<.*//g" \ 46 -i requirements.txt 47 ''; 48 49 checkInputs = [ pytestCheckHook pytest-xdist matplotlib ]; 50 51 # I've had to disable the following tests since they fail while using nix-build, but they do pass 52 # outside the build. They mostly related to the usage of MPI in a sandboxed environment. 53 disabledTests = [ 54 "test_assign_parallel" 55 "test_gs_parallel" 56 "test_if_parallel" 57 "test_if_halo_mpi" 58 "test_cache_blocking_structure_distributed" 59 "test_mpi" 60 "test_codegen_quality0" 61 "test_new_distributor" 62 "test_subdomainset_mpi" 63 "test_init_omp_env_w_mpi" 64 "test_mpi_nocomms" 65 ]; 66 67 disabledTestPaths = [ 68 "tests/test_pickle.py" 69 "tests/test_benchmark.py" 70 "tests/test_mpi.py" 71 "tests/test_autotuner.py" 72 "tests/test_data.py" 73 "tests/test_dse.py" 74 "tests/test_gradient.py" 75 ]; 76 77 propagatedBuildInputs = [ 78 anytree 79 cached-property 80 cgen 81 click 82 codepy 83 distributed 84 nbval 85 multidict 86 psutil 87 py-cpuinfo 88 pyrevolve 89 scipy 90 sympy 91 ]; 92 93 pythonImportsCheck = [ "devito" ]; 94 95 meta = with lib; { 96 broken = stdenv.isDarwin; 97 homepage = "https://www.devitoproject.org/"; 98 description = "Code generation framework for automated finite difference computation"; 99 license = licenses.mit; 100 maintainers = with maintainers; [ atila ]; 101 }; 102}