[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.
From: |
Alex Kost |
Subject: |
Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink. |
Date: |
Tue, 06 Dec 2016 23:35:07 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
ng0 (2016-12-06 20:04 +0000) wrote:
> * gnu/packages/libreoffice.scm (libreoffice)[arguments]: Create symlink to
> libreoffice in new phase.
> ---
> gnu/packages/libreoffice.scm | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
> index e02e4f4cd..5f1435745 100644
> --- a/gnu/packages/libreoffice.scm
> +++ b/gnu/packages/libreoffice.scm
> @@ -2,6 +2,7 @@
> ;;; Copyright © 2014 John Darrington <address@hidden>
> ;;; Copyright © 2015 Andreas Enge <address@hidden>
> ;;; Copyright © 2016 Efraim Flashner <address@hidden>
> +;;; Copyright © 2016 ng0 <address@hidden>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -828,7 +829,15 @@ and to return information on pronunciations, meanings
> and synonyms.")
> (symlink
> (string-append out "/lib/libreoffice/program/soffice")
> (string-append bin "/soffice")))
> - #t)))
> + #t))
> + (add-after 'bin-install 'symlink-libreoffice
> + ;; Create a symlink bin/libreoffice to the executable script.
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out")))
This 'let*' is not needed (since you don't use 'out' variable), however
I've just noticed that there is 'bin-install' phase right before it, so
I think an additional phase is not needed at all, the required
symlinking can be done in that 'bin-install' phase.
> + (with-directory-excursion
> + (string-append (assoc-ref outputs "out") "/bin")
> + (symlink "soffice" "libreoffice"))
> + #t)))
> #:configure-flags
> (list
> "--enable-release-build"
Previously I thought that libreoffice provides "bin/soffice" binary, so
I "voted" for a symlink (as it would simply be "libreoffice ->
soffice"). But now I see that "soffice" is a symlink created by
'bin-install' phase. So now I would just modify that phase like this:
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index e02e4f4..6391482 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -823,11 +823,12 @@ and to return information on pronunciations, meanings and
synonyms.")
;; Create a symlink bin/soffice to the executable script.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
+ (bin (string-append out "/bin"))
+ (soffice (string-append
+ out "/lib/libreoffice/program/soffice")))
(mkdir bin)
- (symlink
- (string-append out "/lib/libreoffice/program/soffice")
- (string-append bin "/soffice")))
+ (symlink soffice (string-append bin "/soffice"))
+ (symlink soffice (string-append bin "/libreoffice")))
#t)))
#:configure-flags
(list
--
Alex
- [PATCH] Add libreoffice symlink to libreoffice, ng0, 2016/12/05
- [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., ng0, 2016/12/05
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., Hartmut Goebel, 2016/12/05
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., ng0, 2016/12/05
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., Hartmut Goebel, 2016/12/06
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., Alex Kost, 2016/12/06
- [PATCH] libreoffice symlink, v2, ng0, 2016/12/06
- [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., ng0, 2016/12/06
- [PATCH] libreoffice symlink, v3, ng0, 2016/12/06
- [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., ng0, 2016/12/06
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink.,
Alex Kost <=
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., ng0, 2016/12/06
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., Alex Kost, 2016/12/08
- Re: [PATCH] gnu: libreoffice: Add 'libreoffice' symlink., Ludovic Courtès, 2016/12/08