aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-06-14 21:59:23 +0200
committerLudovic Courtès <ludo@gnu.org>2018-06-14 23:34:59 +0200
commitbaed923682802b7281bd68274f080d2bb55d3eff (patch)
tree44b3c9e9460f179ff741292d4296499bf56aee07 /gnu/packages
parent0effadcad538241e0cd4ae49a7dececfbb3a8782 (diff)
downloadgnu-guix-baed923682802b7281bd68274f080d2bb55d3eff.tar
gnu-guix-baed923682802b7281bd68274f080d2bb55d3eff.tar.gz
self: Add 'guix-daemon' to the result.
* gnu/packages/package-management.scm (guix-daemon): New variable. * guix/self.scm (whole-package): Add #:daemon and honor it. (compiled-guix): Pass #:daemon to 'whole-package'.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/package-management.scm47
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 24cf3ad015..6d99cddc0d 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -294,6 +294,53 @@ the Nix package manager.")
;; Alias for backward compatibility.
(define-public guix-devel guix)
+(define-public guix-daemon
+ ;; This package is for internal consumption: it allows us to quickly build
+ ;; the 'guix-daemon' program and use that in (guix self), used by 'guix
+ ;; pull'.
+ (package
+ (inherit guix)
+ (properties `((hidden? . #t)))
+ (name "guix-daemon")
+
+ ;; Use a minimum set of dependencies.
+ (native-inputs
+ (fold alist-delete (package-native-inputs guix)
+ '("po4a" "graphviz" "help2man")))
+ (inputs
+ `(("gnutls" ,gnutls)
+ ("guile-git" ,guile-git)
+ ,@(package-inputs guix)))
+ (propagated-inputs '())
+
+ (arguments
+ (substitute-keyword-arguments (package-arguments guix)
+ ((#:tests? #f #f)
+ #f)
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ (replace 'build
+ (lambda _
+ (invoke "make" "nix/libstore/schema.sql.hh")
+ (invoke "make" "-j" (number->string
+ (parallel-job-count))
+ "guix-daemon")))
+ (delete 'copy-bootstrap-guile)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "make" "install-binPROGRAMS"
+ "install-nodist_pkglibexecSCRIPTS")
+
+ ;; We need to tell 'guix-daemon' which 'guix' command to use.
+ ;; Here we use a questionable hack where we hard-code
+ ;; "~root/.config", which could be wrong (XXX).
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (find-files (string-append out "/libexec"))
+ (("exec \".*/bin/guix\"")
+ "exec ~root/.config/current/bin/guix"))
+ #t)))
+ (delete 'wrap-program)))))))
+
(define-public guile2.0-guix
(package
(inherit guix)