at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 datamodeldict, 6 fetchFromGitHub, 7 matplotlib, 8 numericalunits, 9 numpy, 10 pandas, 11 phonopy, 12 potentials, 13 pytestCheckHook, 14 pythonOlder, 15 requests, 16 scipy, 17 setuptools, 18 toolz, 19 xmltodict, 20}: 21 22buildPythonPackage rec { 23 pname = "atomman"; 24 version = "1.5.2"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.8"; 28 29 src = fetchFromGitHub { 30 owner = "usnistgov"; 31 repo = "atomman"; 32 tag = "v${version}"; 33 hash = "sha256-UmvMYVM1YmLvSaVLzWHdxYpRU+Z3z65cy7mfmDZfDG0="; 34 }; 35 36 build-system = [ 37 setuptools 38 numpy 39 cython 40 ]; 41 42 dependencies = [ 43 datamodeldict 44 matplotlib 45 numericalunits 46 numpy 47 pandas 48 potentials 49 requests 50 scipy 51 toolz 52 xmltodict 53 ]; 54 55 pythonRelaxDeps = [ "atomman" ]; 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 nativeCheckInputs = [ 66 phonopy 67 pytestCheckHook 68 ]; 69 70 disabledTests = [ 71 "test_unique_shifts_prototype" # needs network access to download database files 72 ]; 73 74 pythonImportsCheck = [ "atomman" ]; 75 76 meta = with lib; { 77 changelog = "https://github.com/usnistgov/atomman/blob/${src.rev}/UPDATES.rst"; 78 description = "Atomistic Manipulation Toolkit"; 79 homepage = "https://github.com/usnistgov/atomman/"; 80 license = licenses.mit; 81 maintainers = [ ]; 82 }; 83}