Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 1.6 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, pythonRelaxDepsHook 24}: 25 26buildPythonPackage rec { 27 version = "1.4.6"; 28 pname = "atomman"; 29 format = "pyproject"; 30 31 disabled = pythonOlder "3.7"; 32 33 src = fetchFromGitHub { 34 owner = "usnistgov"; 35 repo = "atomman"; 36 rev = "v${version}"; 37 hash = "sha256-tcsxtFbBdMC6+ixzqhnR+5UNwcQmnPQSvuyNA2IYelI="; 38 }; 39 40 nativeBuildInputs = [ 41 setuptools 42 pythonRelaxDepsHook 43 ]; 44 45 propagatedBuildInputs = [ 46 cython 47 datamodeldict 48 matplotlib 49 numericalunits 50 numpy 51 pandas 52 potentials 53 requests 54 scipy 55 toolz 56 xmltodict 57 ]; 58 59 pythonRelaxDeps = [ "potentials" ]; 60 61 preCheck = '' 62 # By default, pytestCheckHook imports atomman from the current directory 63 # instead of from where `pip` installs it and fails due to missing Cython 64 # modules. Fix this by removing atomman from the current directory. 65 # 66 rm -r atomman 67 ''; 68 69 nativeCheckInputs = [ 70 ase 71 phonopy 72 pymatgen 73 pytest 74 pytestCheckHook 75 ]; 76 77 disabledTests = [ 78 "test_unique_shifts_prototype" # needs network access to download database files 79 ]; 80 81 pythonImportsCheck = [ 82 "atomman" 83 ]; 84 85 meta = with lib; { 86 description = "Atomistic Manipulation Toolkit"; 87 homepage = "https://github.com/usnistgov/atomman/"; 88 license = licenses.mit; 89 maintainers = with maintainers; [ costrouc ]; 90 }; 91}