guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28593] [PATCH] gnu: openfoam: Clean up to reduce closure.


From: Ludovic Courtès
Subject: [bug#28593] [PATCH] gnu: openfoam: Clean up to reduce closure.
Date: Mon, 25 Sep 2017 14:52:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi Dave,

Dave Love <address@hidden> skribis:

> This saves ~1GB.
>
> * gnu/packages/simulation.scm (openfoam)[outputs]: Add debug.
> [arguments]: Clean up .o and src after build.

[...]

>  gnu/packages/simulation.scm | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm
> index de07b6844..fef80a1ac 100644
> --- a/gnu/packages/simulation.scm
> +++ b/gnu/packages/simulation.scm
> @@ -84,6 +84,10 @@
>       `(("gzip" ,gzip)
>         ("gnuplot" ,gnuplot)
>         ("openmpi" ,openmpi)))
> +    ;; FIXME: Also separate tutorials (80MB) and src (60MB); maybe also doc
> +    ;; (8MB)
> +    (outputs '("debug"                  ;~60MB
> +               "out"))

Normally the ‘strip’ phase would strip things.  I guess the problem here
is that libraries are not in lib/, so nothing gets stripped.  This would
be worked around by simply passing something like:

  #:strip-directories '("OpenFOAM-1.2.3/lib")

> +                  (add-after 'build 'cleanup
> +                    ;; Avoid lots of junk installed
> +                    (lambda _
> +                      (delete-file-recursively
> +                       "platforms/linux64GccDPInt32Opt/src")
> +                      (delete-file-recursively
> +                       "platforms/linux64GccDPInt32OptSYSTEMOPENMPI/src")
> +                      (zero?
> +                       (system* "find" "-name" "*.o" "-delete"))))

Rather:

  (for-each delete-file (find-files "." "\\.o$"))

Paul can you confirm that this is OK?

If it is, could you update the patch accordingly, Dave?

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]