summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2026-02-13 11:05:28 +0000
committerDanny Milosavljevic <dannym@friendly-machines.com>2026-02-21 21:52:38 +0100
commit2e7ae98c245ddb9fd2181260a4be7c47116bdc77 (patch)
tree946535002061c2540145443256131668f8a85840
parent1b149929cd25321ad40683f8019bf1e597ea1e0a (diff)
gnu: python-brille: Move to (gnu packages physics).
* gnu/packages/python-science.scm (python-brille): Move from here… * gnu/packages/physics.scm (python-brille): …to here. * gnu/local.mk (GNU_SYSTEM_MODULES): Add reference to that file. * etc/teams.scm (science): Add reference to that file. Change-Id: I207940441fb4406fb034d5582ba9f5517544179b
-rw-r--r--CODEOWNERS1
-rwxr-xr-xetc/teams.scm1
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/physics.scm119
-rw-r--r--gnu/packages/python-science.scm77
5 files changed, 122 insertions, 77 deletions
diff --git a/CODEOWNERS b/CODEOWNERS
index 83b3dafbddd..66ffe554962 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -373,6 +373,7 @@ gnu/packages/graph\.scm @guix/science
373gnu/packages/lean\.scm @guix/science 373gnu/packages/lean\.scm @guix/science
374gnu/packages/maths\.scm @guix/science 374gnu/packages/maths\.scm @guix/science
375gnu/packages/medical\.scm @guix/science 375gnu/packages/medical\.scm @guix/science
376gnu/packages/physics\.scm @guix/science
376gnu/packages/sagemath\.scm @guix/science 377gnu/packages/sagemath\.scm @guix/science
377gnu/packages/statistics\.scm @guix/science 378gnu/packages/statistics\.scm @guix/science
378 379
diff --git a/etc/teams.scm b/etc/teams.scm
index 2445c25aa88..58c05282efe 100755
--- a/etc/teams.scm
+++ b/etc/teams.scm
@@ -1044,6 +1044,7 @@ packages (e.g. Astronomy, Chemistry, Math, Physics etc.)"
1044 "gnu/packages/lean.scm" 1044 "gnu/packages/lean.scm"
1045 "gnu/packages/maths.scm" 1045 "gnu/packages/maths.scm"
1046 "gnu/packages/medical.scm" 1046 "gnu/packages/medical.scm"
1047 "gnu/packages/physics.scm"
1047 "gnu/packages/sagemath.scm" 1048 "gnu/packages/sagemath.scm"
1048 "gnu/packages/statistics.scm"))) 1049 "gnu/packages/statistics.scm")))
1049 1050
diff --git a/gnu/local.mk b/gnu/local.mk
index c7f45dd4d24..13d878373f9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -549,6 +549,7 @@ GNU_SYSTEM_MODULES = \
549 %D%/packages/phabricator.scm \ 549 %D%/packages/phabricator.scm \
550 %D%/packages/php.scm \ 550 %D%/packages/php.scm \
551 %D%/packages/php-xyz.scm \ 551 %D%/packages/php-xyz.scm \
552 %D%/packages/physics.scm \
552 %D%/packages/piet.scm \ 553 %D%/packages/piet.scm \
553 %D%/packages/diagram.scm \ 554 %D%/packages/diagram.scm \
554 %D%/packages/pkg-config.scm \ 555 %D%/packages/pkg-config.scm \
diff --git a/gnu/packages/physics.scm b/gnu/packages/physics.scm
new file mode 100644
index 00000000000..4847e430956
--- /dev/null
+++ b/gnu/packages/physics.scm
@@ -0,0 +1,119 @@
1;;; Copyright © 2026 Danny Milosavljevic <dannym@friendly-machines.com>
2;;;
3;;; This file is part of GNU Guix.
4;;;
5;;; GNU Guix is free software; you can redistribute it and/or modify it
6;;; under the terms of the GNU General Public License as published by
7;;; the Free Software Foundation; either version 3 of the License, or (at
8;;; your option) any later version.
9;;;
10;;; GNU Guix is distributed in the hope that it will be useful, but
11;;; WITHOUT ANY WARRANTY; without even the implied warranty of
12;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13;;; GNU General Public License for more details.
14;;;
15;;; You should have received a copy of the GNU General Public License
16;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
17
18(define-module (gnu packages physics)
19 #:use-module ((guix licenses) #:prefix license:)
20 #:use-module (guix build-system cmake)
21 #:use-module (guix build-system pyproject)
22 #:use-module ((guix build-system python) #:select (pypi-uri))
23 #:use-module (guix build-system qt)
24 #:use-module (guix download)
25 #:use-module (guix gexp)
26 #:use-module (guix git-download)
27 #:use-module (guix packages)
28 #:use-module (guix utils)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages check)
31 #:use-module (gnu packages cmake)
32 #:use-module (gnu packages maths)
33 #:use-module (gnu packages python)
34 #:use-module (gnu packages python-build)
35 #:use-module (gnu packages python-check)
36 #:use-module (gnu packages python-compression)
37 #:use-module (gnu packages python-crypto)
38 #:use-module (gnu packages python-graphics)
39 #:use-module (gnu packages python-science)
40 #:use-module (gnu packages python-web)
41 #:use-module (gnu packages python-xyz)
42 #:use-module (gnu packages qt))
43
44(define-public python-brille
45 (package
46 (name "python-brille")
47 (version "0.8.3")
48 (source
49 (origin
50 (method git-fetch)
51 (uri (git-reference
52 (url "https://github.com/brille/brille")
53 (commit (string-append "v" version))))
54 (file-name (git-file-name name version))
55 (sha256
56 (base32 "1vyxa7k6yrpxizbmljrv7bnsf7dzxsfbs4id36x09jjxwh7dysjj"))))
57 (build-system cmake-build-system)
58 (arguments
59 (list
60 #:configure-flags
61 #~(list
62 ;; Boost.System is header-only since 1.69, but FindBoost looks for
63 ;; libboost_system.so which doesn't exist.
64 "-DHIGHFIVE_USE_BOOST=OFF"
65 ;; Pretend we're doing a scikit-build build to skip Conan.
66 "-DSKBUILD=ON"
67 (string-append "-DSKBUILD_PROJECT_NAME=brille")
68 (string-append "-DSKBUILD_PROJECT_VERSION=" #$version))
69 #:imported-modules `(,@%cmake-build-system-modules
70 ,@%pyproject-build-system-modules)
71 #:modules '((guix build cmake-build-system)
72 ((guix build python-build-system) #:select (site-packages))
73 (guix build utils))
74 #:phases
75 (with-extensions (list (pyproject-guile-json))
76 #~(modify-phases %standard-phases
77 (add-after 'unpack 'create-pkg-info
78 (lambda _
79 ;; Create PKG-INFO so DynamicVersion.cmake finds version without git.
80 (call-with-output-file "PKG-INFO"
81 (lambda (port)
82 (format port "Metadata-Version: 2.1
83Name: brille
84Version: ~a
85" #$version)))))
86 (add-before 'configure 'set-version
87 (lambda _
88 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
89 (add-after 'install 'install-python
90 (lambda* (#:key inputs outputs #:allow-other-keys)
91 (let ((site-packages (site-packages inputs outputs)))
92 (mkdir-p (string-append site-packages "/brille"))
93 ;; Install Python source files and compiled extension module.
94 (for-each (lambda (file)
95 (install-file file
96 (string-append site-packages "/brille")))
97 (append
98 (find-files "../source/brille" "\\.py$")
99 (find-files "." "^_brille\\..*\\.so$"))))))))))
100 (native-inputs
101 (list catch2-3
102 cmake-minimal
103 highfive
104 pybind11
105 python-wrapper
106 python-setuptools
107 python-setuptools-scm))
108 (inputs
109 (list hdf5))
110 (propagated-inputs
111 (list python-numpy))
112 (home-page "https://github.com/brille/brille")
113 (synopsis "Symmetry operations and interpolation in Brillouin zones")
114 (description
115 "Brille is a C++ library for symmetry operations and linear interpolation
116within an irreducible part of the first Brillouin zone. It provides Python
117bindings via pybind11 for use in phonon calculations and inelastic neutron
118scattering simulations.")
119 (license license:agpl3+)))
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 798ad52e9e3..aded33595fe 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -6498,83 +6498,6 @@ Python style, together with a fast and comfortable execution environment.")
6498 python-setuptools 6498 python-setuptools
6499 python-wheel)))) 6499 python-wheel))))
6500 6500
6501(define-public python-brille
6502 (package
6503 (name "python-brille")
6504 (version "0.8.3")
6505 (source
6506 (origin
6507 (method git-fetch)
6508 (uri (git-reference
6509 (url "https://github.com/brille/brille")
6510 (commit (string-append "v" version))))
6511 (file-name (git-file-name name version))
6512 (sha256
6513 (base32 "1vyxa7k6yrpxizbmljrv7bnsf7dzxsfbs4id36x09jjxwh7dysjj"))))
6514 (build-system cmake-build-system)
6515 (arguments
6516 (list
6517 #:configure-flags
6518 #~(list
6519 ;; Boost.System is header-only since 1.69, but FindBoost looks for
6520 ;; libboost_system.so which doesn't exist.
6521 "-DHIGHFIVE_USE_BOOST=OFF"
6522 ;; Pretend we're doing a scikit-build build to skip Conan.
6523 "-DSKBUILD=ON"
6524 (string-append "-DSKBUILD_PROJECT_NAME=brille")
6525 (string-append "-DSKBUILD_PROJECT_VERSION=" #$version))
6526 #:imported-modules `(,@%cmake-build-system-modules
6527 ,@%pyproject-build-system-modules)
6528 #:modules '((guix build cmake-build-system)
6529 ((guix build python-build-system) #:select (site-packages))
6530 (guix build utils))
6531 #:phases
6532 (with-extensions (list (pyproject-guile-json))
6533 #~(modify-phases %standard-phases
6534 (add-after 'unpack 'create-pkg-info
6535 (lambda _
6536 ;; Create PKG-INFO so DynamicVersion.cmake finds version without git.
6537 (call-with-output-file "PKG-INFO"
6538 (lambda (port)
6539 (format port "Metadata-Version: 2.1
6540Name: brille
6541Version: ~a
6542" #$version)))))
6543 (add-before 'configure 'set-version
6544 (lambda _
6545 (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
6546 (add-after 'install 'install-python
6547 (lambda* (#:key inputs outputs #:allow-other-keys)
6548 (let ((site-packages (site-packages inputs outputs)))
6549 (mkdir-p (string-append site-packages "/brille"))
6550 ;; Install Python source files and compiled extension module.
6551 (for-each (lambda (file)
6552 (install-file file
6553 (string-append site-packages "/brille")))
6554 (append
6555 (find-files "../source/brille" "\\.py$")
6556 (find-files "." "^_brille\\..*\\.so$"))))))))))
6557 (native-inputs
6558 (list catch2-3
6559 cmake-minimal
6560 highfive
6561 pybind11
6562 python-wrapper
6563 python-setuptools
6564 python-setuptools-scm))
6565 (inputs
6566 (list hdf5))
6567 (propagated-inputs
6568 (list python-numpy))
6569 (home-page "https://github.com/brille/brille")
6570 (synopsis "Symmetry operations and interpolation in Brillouin zones")
6571 (description
6572 "Brille is a C++ library for symmetry operations and linear interpolation
6573within an irreducible part of the first Brillouin zone. It provides Python
6574bindings via pybind11 for use in phonon calculations and inelastic neutron
6575scattering simulations.")
6576 (license license:agpl3+)))
6577
6578(define-public python-spglib 6501(define-public python-spglib
6579 (package 6502 (package
6580 (name "python-spglib") 6503 (name "python-spglib")