unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Bilke <lars.bilke@ufz.de>
To: 67822@debbugs.gnu.org
Cc: Lars Bilke <lars.bilke@ufz.de>, Andreas Enge <andreas@enge.fr>,
	Efraim Flashner <efraim@flashner.co.il>,
	Eric Bavier <bavier@posteo.net>
Subject: [bug#67822] [PATCH v3] gnu: maths: petsc: Reduce closure size.
Date: Fri, 15 Dec 2023 09:55:57 +0100	[thread overview]
Message-ID: <6a6413853ce16af65e143bd727715be6dd7d6048.1702630557.git.lars.bilke@ufz.de> (raw)
In-Reply-To: <9ba967c61c66acea4b4c3b1db6e1a446ad9e827e.1702558568.git.lars.bilke@ufz.de>

Reduces closure size by around 350 MB by removing refernces to build dependencies (e.g. gcc).

Fixed a regex from v2.

Change-Id: I2e6900747b2118546f0a39ceb109b3f2f90e6949
---
 gnu/packages/maths.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0f4d29b40f..4b2643e535 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3484,8 +3484,20 @@ (define-public petsc
                           '("configure.log" "make.log" "gmake.log"
                             "test.log" "error.log" "RDict.db"
                             "PETScBuildInternal.cmake"
+                            "configure-hash"
                             ;; Once installed, should uninstall with Guix
                             "uninstall.py")))))
+          (add-after 'clean-install 'clear-reference-to-compiler
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              ;; Do not retain a reference to GCC and other build only inputs.
+              (let ((out (assoc-ref outputs "out")))
+              (substitute* (string-append out "/lib/petsc/conf/petscvariables")
+                (("/gnu/store/.*/bin/gcc") "gcc")
+                (("/gnu/store/.*/bin/g\\+\\+") "g++")
+                (("/gnu/store/.*/bin/make") "make")
+                (("/gnu/store/.*/bin/diff") "diff")
+                (("/gnu/store/.*/bin/sed") "sed")
+                ))))
           (add-after 'install 'move-examples
             (lambda* (#:key outputs #:allow-other-keys)
               (let* ((out (assoc-ref outputs "out"))

base-commit: ac61e9705fb8c450c6cd0c1731fbb1b909c1f944
-- 
2.43.0





  parent reply	other threads:[~2023-12-15  8:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 12:56 [bug#67822] [PATCH] gnu: maths: petsc: Reduce closure size Lars Bilke
2023-12-14 14:53 ` [bug#67822] [PATCH v2] " Lars Bilke
2023-12-15  8:55 ` Lars Bilke [this message]
2024-01-05 11:08   ` [bug#67822] [PATCH v3] " Ludovic Courtès
2024-01-05 11:52     ` Lars Bilke
2024-01-07  9:09       ` Efraim Flashner
2024-01-08 17:20         ` Ludovic Courtès
2024-01-09 18:15 ` [bug#67822] [PATCH v4] " Lars Bilke
2024-02-27  7:49   ` Lars Bilke
2024-02-27  9:50   ` bug#67822: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a6413853ce16af65e143bd727715be6dd7d6048.1702630557.git.lars.bilke@ufz.de \
    --to=lars.bilke@ufz.de \
    --cc=67822@debbugs.gnu.org \
    --cc=andreas@enge.fr \
    --cc=bavier@posteo.net \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).