aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Bavier <bavier@cray.com>2018-07-31 11:31:59 -0500
committerEric Bavier <bavier@member.fsf.org>2018-09-05 08:10:37 -0500
commita3a99e27bb727b0407da13955ef47566a1919629 (patch)
tree6ad2994b3cd0e9dd48e4810fc06a4cc121cb721a
parentb26e4f26ff0bfede3dc17db48dce2936ecd0c129 (diff)
downloadguix-a3a99e27bb727b0407da13955ef47566a1919629.tar.gz
guix-a3a99e27bb727b0407da13955ef47566a1919629.zip
petsc: Move example code to "examples" output.
* gnu/packages/maths.scm (petsc)[arguments]: New 'move-examples' phase.
-rw-r--r--gnu/packages/maths.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index c6bcec844b..ba39531bdb 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1589,6 +1589,8 @@ September 2004}")
"petsc-lite-" version ".tar.gz"))
(sha256
(base32 "1lajbk3c29hnh83v6cbmm3a8wv6bdykh0p70kwrr4vrnizalk88s"))))
+ (outputs '("out" ;libraries and headers
+ "examples")) ;~24MiB of examples
(build-system gnu-build-system)
(native-inputs
`(("python" ,python-2)))
@@ -1662,6 +1664,15 @@ September 2004}")
"PETScBuildInternal.cmake"
;; Once installed, should uninstall with Guix
"uninstall.py"))
+ #t)))
+ (add-after 'install 'move-examples
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (examples (assoc-ref outputs "examples"))
+ (exdir (string-append out "/share/petsc/examples"))
+ (exdir' (string-append examples "/share/petsc/examples")))
+ (copy-recursively exdir exdir')
+ (delete-file-recursively exdir)
#t))))))
(home-page "http://www.mcs.anl.gov/petsc")
(synopsis "Library to solve PDEs")