1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 buildPythonPackage,
6 isPy27,
7 fetchPypi,
8 pythonAtLeast,
9
10 # build-system
11 setuptools,
12
13 # dependencies
14 flask,
15 matplotlib,
16 numpy,
17 pillow,
18 psycopg2,
19 scipy,
20 tkinter,
21
22 # tests
23 addBinToPathHook,
24 pytestCheckHook,
25 pytest-mock,
26 pytest-xdist,
27 writableTmpDirAsHomeHook,
28}:
29
30buildPythonPackage rec {
31 pname = "ase";
32 version = "3.25.0-unstable-2025-06-24";
33 pyproject = true;
34
35 src = fetchFromGitLab {
36 owner = "ase";
37 repo = "ase";
38 rev = "4e22dabfbe7ae2329e50260ca1b6f08a83527ac3";
39 hash = "sha256-ehMyVtPxfTxT8T418VyLGnUEyYip4LPTTaGL0va7qgM=";
40 };
41
42 build-system = [ setuptools ];
43
44 dependencies = [
45 flask
46 matplotlib
47 numpy
48 pillow
49 psycopg2
50 scipy
51 ]
52 ++ lib.optionals stdenv.hostPlatform.isDarwin [
53 tkinter
54 ];
55
56 nativeCheckInputs = [
57 addBinToPathHook
58 pytestCheckHook
59 pytest-mock
60 pytest-xdist
61 writableTmpDirAsHomeHook
62 ];
63
64 disabledTests = [
65 "test_fundamental_params"
66 "test_ase_bandstructure"
67 "test_imports"
68 "test_units"
69 "test_favicon"
70 "test_vibrations_methods" # missing attribute
71 "test_jmol_roundtrip" # missing attribute
72 "test_pw_input_write_nested_flat" # Did not raise DeprecationWarning
73 "test_fix_scaled" # Did not raise UserWarning
74 "test_ipi_protocol" # flaky
75 ]
76 ++ lib.optionals (pythonAtLeast "3.12") [ "test_info_calculators" ];
77
78 pythonImportsCheck = [ "ase" ];
79
80 meta = {
81 description = "Atomic Simulation Environment";
82 homepage = "https://wiki.fysik.dtu.dk/ase/";
83 license = lib.licenses.lgpl21Plus;
84 maintainers = [ ];
85 };
86}