diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-02-13 11:27:31 +0000 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-02-21 21:52:39 +0100 |
| commit | d5653abf5470cf30876a6edb075ee30f7e1a8efd (patch) | |
| tree | 7ef0ea0f128d5382930789e144182c042a86b5a6 /gnu/packages/physics.scm | |
| parent | e5dacef22d499a7e75636862de1774cc46ae65f3 (diff) | |
gnu: Add python-gofit.
* gnu/packages/physics.scm (python-gofit): New variable.
Change-Id: If134c0ea69eb76c62b1439b82a7474832938ff19
Diffstat (limited to 'gnu/packages/physics.scm')
| -rw-r--r-- | gnu/packages/physics.scm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/physics.scm b/gnu/packages/physics.scm index d9f0f80b582..9660c9619a5 100644 --- a/gnu/packages/physics.scm +++ b/gnu/packages/physics.scm @@ -28,6 +28,7 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages build-tools) #:use-module (gnu packages check) #:use-module (gnu packages cmake) @@ -124,6 +125,47 @@ bindings via pybind11 for use in phonon calculations and inelastic neutron scattering simulations.") (license license:agpl3+))) +(define-public python-gofit + (package + (name "python-gofit") + (version "1.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ralna/gofit") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0x7kk97k4v1mzgs29z9i2yidjx4hmdwhng77178l564hn29k1c2b")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-requirements + (lambda _ + ;; pybind11[global] is a build-time dependency, not runtime. + ;; <https://github.com/pybind/python_example/issues/45> + (substitute* "setup.py" + (("install_requires=") + "setup_requires=")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; test_multistart_ls.py needs cubic.txt in cwd + (copy-file "tests/cubic.txt" "cubic.txt") + (for-each (lambda (test) + (invoke "python" test)) + (find-files "tests" "^test_.*\\.py$")))))))) + (native-inputs (list pybind11 python-setuptools cmake python-pytest + python-numpy)) + (inputs (list eigen)) + (home-page "https://github.com/ralna/gofit") + (synopsis "GOFit: Global Optimization for Fitting problems") + (description "GOFit: Global Optimization for Fitting problems.") + (license license:bsd-3))) + (define-public python-pycifrw (package (name "python-pycifrw") |
