From 1394765238c21030ace4fbb773dc86a9e3c2504c Mon Sep 17 00:00:00 2001 From: raingloom Date: Sun, 6 Sep 2020 19:11:32 +0200 Subject: gnu: coq: fix coqide not finding coqidetop.opt * gnu/packages/coq.scm (coq) [arguments]: Turn duplicates into symlinks instead of deleting them in remove-duplicate. Signed-off-by: Julien Lepiller --- gnu/packages/coq.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'gnu/packages/coq.scm') diff --git a/gnu/packages/coq.scm b/gnu/packages/coq.scm index 8f98017520..11afdf59f2 100644 --- a/gnu/packages/coq.scm +++ b/gnu/packages/coq.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019 Dan Frumin ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Björn Höfling +;;; Copyright © 2020 raingloom ;;; ;;; This file is part of GNU Guix. ;;; @@ -96,11 +97,18 @@ (define-public coq (add-after 'install 'remove-duplicate (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin"))) + (bin (string-append out "/bin")) + (coqtop (string-append bin "/coqtop")) + (coqidetop (string-append bin "/coqidetop")) + (coqtop.opt (string-append coqtop ".opt")) + (coqidetop.opt (string-append coqidetop ".opt"))) ;; These files are exact copies without `.opt` extension. ;; Removing these saves 35 MiB in the resulting package. - (delete-file (string-append bin "/coqtop.opt")) - (delete-file (string-append bin "/coqidetop.opt"))) + ;; Unfortunately, completely deleting them breaks coqide. + (delete-file coqtop.opt) + (delete-file coqidetop.opt) + (symlink coqtop coqtop.opt) + (symlink coqidetop coqidetop.opt)) #t)) (add-after 'install 'install-ide (lambda* (#:key outputs #:allow-other-keys) -- cgit v1.2.3