diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2026-01-28 08:30:13 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-02-07 12:28:48 +0100 |
| commit | e416c68d0eb33e7438ad3f142c4e41c0c8f02a3c (patch) | |
| tree | a03d0a1fe234efea0ea712a846ea7fae464940fd | |
| parent | 898167e3c8113ac62296be94c8ef0a8bf761919b (diff) | |
gnu: libreoffice: Switch to pyproject.
* gnu/packages/libreoffice.scm (libreoffice):
[arguments]<#:modules, #:imported-modules>: Switch to
pyproject-build-system.
<#:phases>: Use site-packages in phase 'bin-and-desktop-install.
Change-Id: If333d833cfcc0286ac55ac028dba326a4b6cd794
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
| -rw-r--r-- | gnu/packages/libreoffice.scm | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index cd0deb80d1d..ab9c00049fd 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -934,9 +934,9 @@ commonly called @code{ftoa} or @code{dtoa}.") (build-system glib-or-gtk-build-system) (arguments (list - #:imported-modules `((guix build python-build-system) - ,@%glib-or-gtk-build-system-modules) - #:modules `(((guix build python-build-system) #:select (python-version)) + #:imported-modules (append %glib-or-gtk-build-system-modules + %pyproject-build-system-modules) + #:modules `(((guix build pyproject-build-system) #:prefix py:) (ice-9 textual-ports) (srfi srfi-1) (srfi srfi-26) @@ -1047,13 +1047,9 @@ commonly called @code{ftoa} or @code{dtoa}.") (add-after 'install 'bin-and-desktop-install ;; Create 'soffice' and 'libreoffice' symlinks to the executable ;; script. - (lambda _ + (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out #$output) - (python-libdir - (string-append out "/lib/python" - (python-version - #$(this-package-input "python")) - "/site-packages/"))) + (python-site (py:site-packages inputs outputs))) (define (symlink-output src dst) (mkdir-p (dirname (string-append out dst))) (symlink (string-append out src) (string-append out dst))) @@ -1085,16 +1081,16 @@ commonly called @code{ftoa} or @code{dtoa}.") (lambda _ (let ((file (get-string-all (current-input-port)))) (with-output-to-file - (string-append python-libdir name ".py") + (string-append python-site "/" name ".py") (lambda _ - (format (current-output-port) "~a" - (string-append - "import sys, os\n" - "sys.path.append('" - out "/lib/libreoffice/program" "')\n" - "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:" - out "/lib/libreoffice/program/fundamentalrc')\n\n" - file))))))) + (format (current-output-port) "\ +import sys, os +sys.path.append('~a/lib/libreoffice/program') +os.putenv('URE_BOOTSTRAP', \ +'vnd.sun.star.pathname:~a/lib/libreoffice/program/fundamentalrc') + +~a" + out out file)))))) (delete-file (string-append out "/lib/libreoffice/program/" name ".py"))) (symlink-output "/lib/libreoffice/program/soffice" @@ -1112,7 +1108,7 @@ commonly called @code{ftoa} or @code{dtoa}.") (mkdir-p (string-append out "/share/icons/hicolor")) (copy-recursively "sysui/desktop/icons/hicolor" (string-append out "/share/icons/hicolor")) - (mkdir-p python-libdir) + (mkdir-p python-site) (for-each install-python-script '("access2base" "mailmerge" "msgbox" "officehelper" "pythonloader" "pythonscript" "scriptforge" |
