at 23.05-pre 1.5 kB view raw
1{ lib 2, ase 3, buildPythonPackage 4, cython 5, datamodeldict 6, fetchFromGitHub 7, matplotlib 8, numericalunits 9, numpy 10, pandas 11, phonopy 12, potentials 13, pymatgen 14, pytest 15, pytestCheckHook 16, pythonOlder 17, pythonAtLeast 18, requests 19, scipy 20, setuptools 21, toolz 22, xmltodict 23}: 24 25buildPythonPackage rec { 26 version = "1.4.6"; 27 pname = "atomman"; 28 format = "pyproject"; 29 30 disabled = pythonOlder "3.7"; 31 32 src = fetchFromGitHub { 33 owner = "usnistgov"; 34 repo = "atomman"; 35 rev = "v${version}"; 36 hash = "sha256-tcsxtFbBdMC6+ixzqhnR+5UNwcQmnPQSvuyNA2IYelI="; 37 }; 38 39 nativeBuildInputs = [ 40 setuptools 41 ]; 42 43 propagatedBuildInputs = [ 44 cython 45 datamodeldict 46 matplotlib 47 numericalunits 48 numpy 49 pandas 50 potentials 51 requests 52 scipy 53 toolz 54 xmltodict 55 ]; 56 57 preCheck = '' 58 # By default, pytestCheckHook imports atomman from the current directory 59 # instead of from where `pip` installs it and fails due to missing Cython 60 # modules. Fix this by removing atomman from the current directory. 61 # 62 rm -r atomman 63 ''; 64 65 checkInputs = [ 66 ase 67 phonopy 68 pymatgen 69 pytest 70 pytestCheckHook 71 ]; 72 73 disabledTests = [ 74 "test_unique_shifts_prototype" # needs network access to download database files 75 ]; 76 77 pythonImportsCheck = [ 78 "atomman" 79 ]; 80 81 meta = with lib; { 82 description = "Atomistic Manipulation Toolkit"; 83 homepage = "https://github.com/usnistgov/atomman/"; 84 license = licenses.mit; 85 maintainers = with maintainers; [ costrouc ]; 86 }; 87}