summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-06-16 13:17:40 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-06-16 13:35:56 +0200
commitb6329d026b6b5ac58cfcfeb26e786aacf70bd636 (patch)
tree09992a26ba41e3f02bb49f6a93d8facdb630b846 /gnu
parent38ee8f7dbaabbb1ba28bc0fa6240a19bba2450c3 (diff)
downloadguix-b6329d026b6b5ac58cfcfeb26e786aacf70bd636.tar.gz
gnu: nix: Look for configuration in /etc.
Fixes <http://issues.guix.gnu.org/41704>.

* gnu/packages/package-management.scm (nix)[arguments]: Add
‘--sysconfdir=/etc’ configure flag and override it during installation.

Requested-and-tested-by: Peng Mei Yu <pengmeiyu@riseup.net>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/package-management.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index c1e6657dff..4b1c5a6d55 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -551,6 +551,21 @@ out) and returning a package that uses that as its 'source'."
               (base32
                "1hbqsrp1ii2sfq8x2mahjrl2182qck76n8blrl1jfz3xq99m6i15"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--sysconfdir=/etc")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+           ;; Don't try & fail to create subdirectories in /etc, but keep them
+           ;; in the output as examples.
+           (lambda* (#:key (make-flags '()) outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (etc (string-append out "/etc")))
+               (apply invoke "make" "install"
+                      (string-append "sysconfdir=" etc)
+                      (string-append "profiledir=" etc "/profile.d")
+                      make-flags)))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs `(("boost" ,boost)
               ("brotli" ,brotli)