aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-04-05 12:34:45 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-04-05 16:13:29 -0400
commit59446b208c9b3a9f1901cd6ba518768220903dc9 (patch)
tree206daa3cd26c382057ef3aeffe1d5a5d3c29fade
parenta71c315bc2e5b4ab6332095e9fdc2617191abb5e (diff)
downloadgnu-guix-59446b208c9b3a9f1901cd6ba518768220903dc9.tar
gnu-guix-59446b208c9b3a9f1901cd6ba518768220903dc9.tar.gz
gnu: nginx: Clean up installation directories.
* gnu/packages/web.scm (nginx): Add 'fix-root-dirs' phase.
-rw-r--r--gnu/packages/web.scm17
1 files changed, 16 insertions, 1 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 031bbcafe4..374642862a 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -137,7 +137,22 @@ and its related documentation.")
(setenv "CC" "gcc")
(format #t "environment variable `CC' set to `gcc'~%")
(format #t "configure flags: ~s~%" flags)
- (zero? (apply system* "./configure" flags))))))))
+ (zero? (apply system* "./configure" flags)))))
+ (add-after install fix-root-dirs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; 'make install' puts things in strange places, so we need to
+ ;; clean it up ourselves.
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/nginx")))
+ ;; This directory is empty, so get rid of it.
+ (rmdir (string-append out "/logs"))
+ ;; Example configuration and HTML files belong in
+ ;; /share.
+ (mkdir-p share)
+ (rename-file (string-append out "/conf")
+ (string-append share "/conf"))
+ (rename-file (string-append out "/html")
+ (string-append share "/html"))))))))
(home-page "http://nginx.org")
(synopsis "HTTP and reverse proxy server")
(description