From 5f657caf1a651122158a8d38ed972f5ec737dabe Mon Sep 17 00:00:00 2001
From: Charl Linssen <c.linssen@fz-juelich.de>
Date: Wed, 1 Mar 2023 18:08:22 +0100
Subject: [PATCH] Add NESTML

---
 packages/py-nestml/package.py     | 29 +++++++++++++++++++++++++++++
 packages/py-odetoolbox/package.py | 26 ++++++++++++++++++++++++++
 spack.yaml                        |  1 +
 3 files changed, 56 insertions(+)
 create mode 100644 packages/py-nestml/package.py
 create mode 100644 packages/py-odetoolbox/package.py

diff --git a/packages/py-nestml/package.py b/packages/py-nestml/package.py
new file mode 100644
index 00000000..020fbcd7
--- /dev/null
+++ b/packages/py-nestml/package.py
@@ -0,0 +1,29 @@
+from spack import *
+
+
+class PyNestml(PythonPackage):
+    """A Python package for writing and generating code for (spiking) neuron
+    models and synaptic plasticity rules. Supports C++ code generation for
+    NEST Simulator as well as other target platforms.
+    """
+
+    homepage = 'https://nestml.readthedocs.org/'
+    url      = 'https://pypi.org/packages/py3/N/NESTML/NESTML-5.2.0-py3-none-any.whl'
+    git      = 'https://github.com/nest/nestml/'
+
+    maintainers = ['clinssen', 'pnbabu', 'jougs']
+
+    version('5.2.0', sha256='acb703bf9c7f70304bd5d547dccd6a6a219f8acb298a6412df779b808241eb14', expand=False)
+
+    depends_on('python@3.8:', type=('build', 'run'))
+    depends_on('py-pip', type='build')
+    depends_on('py-numpy', type=('build', 'run'))
+    depends_on('py-scipy', type=('build', 'run'))
+    depends_on('py-sympy', type=('build', 'run'))
+    depends_on('py-antlr4-python3-runtime', type=('build', 'run'))
+    depends_on('py-setuptools', type=('build', 'run'))
+    depends_on('py-jinja2', type=('build', 'run'))
+    depends_on('py-astropy', type=('build', 'run'))
+    depends_on('py-odetoolbox', type=('build', 'run'))
+    depends_on('nest', type=('build', 'run'))
+    depends_on('py-pytest', type='test')
diff --git a/packages/py-odetoolbox/package.py b/packages/py-odetoolbox/package.py
new file mode 100644
index 00000000..0f8265d1
--- /dev/null
+++ b/packages/py-odetoolbox/package.py
@@ -0,0 +1,26 @@
+from spack import *
+
+
+class PyOdetoolbox(PythonPackage):
+    """A Python package for the automatic selection and generation of
+    integration schemes for systems of ordinary differential equations
+    """
+
+    homepage = 'https://ode-toolbox.readthedocs.io'
+    url      = 'https://pypi.org/packages/py3/o/odetoolbox/odetoolbox-2.5-py3-none-any.whl'
+    git      = 'https://github.com/nest/ode-toolbox'
+
+    maintainers = ['clinssen']
+
+    version('2.5', sha256='947bbb289830dde60066106f5f628de2598a71129eafff8ec86317a0b5e8960e', expand=False)
+
+    depends_on('python@3.8:', type=('build', 'run'))
+    depends_on('py-pip', type='build')
+    depends_on('py-sympy@:1.4,1.7,1.8,1.9,1.11:', type=('build', 'run'))
+    depends_on('py-scipy', type=('build', 'run'))
+    depends_on('py-numpy@1.8.2:', type=('build', 'run'))
+    depends_on('py-cython', type=('build', 'run'))
+    depends_on('py-graphviz', type=('build', 'run'))
+    depends_on('py-matplotlib', type=('build', 'run'))
+    depends_on('py-setuptools', type=('build', 'run'))
+    depends_on('py-pytest', type='test')
diff --git a/spack.yaml b/spack.yaml
index 1f21a492..52ca0bf4 100644
--- a/spack.yaml
+++ b/spack.yaml
@@ -21,6 +21,7 @@ spack:
     - py-tvb-framework@2.7.3.1
     - pynn-brainscales@4.0-a4
     - hxtorch@4.0-a4
+    - py-nestml@5.2.0
     - py-neo@0.12.0
     - py-hdmf@3.4.6
     - py-pynwb@2.1.0
-- 
GitLab