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'.
This commit is contained in:
		
							parent
							
								
									0effadcad5
								
							
						
					
					
						commit
						baed923682
					
				
					 2 changed files with 61 additions and 1 deletions
				
			
		| 
						 | 
					@ -294,6 +294,53 @@ the Nix package manager.")
 | 
				
			||||||
;; Alias for backward compatibility.
 | 
					;; Alias for backward compatibility.
 | 
				
			||||||
(define-public guix-devel guix)
 | 
					(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
 | 
					(define-public guile2.0-guix
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (inherit guix)
 | 
					    (inherit guix)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -385,7 +385,7 @@ load path."
 | 
				
			||||||
(define* (whole-package name modules dependencies
 | 
					(define* (whole-package name modules dependencies
 | 
				
			||||||
                        #:key
 | 
					                        #:key
 | 
				
			||||||
                        (guile-version (effective-version))
 | 
					                        (guile-version (effective-version))
 | 
				
			||||||
                        info
 | 
					                        info daemon
 | 
				
			||||||
                        (command (guix-command modules
 | 
					                        (command (guix-command modules
 | 
				
			||||||
                                               #:dependencies dependencies
 | 
					                                               #:dependencies dependencies
 | 
				
			||||||
                                               #:guile-version guile-version)))
 | 
					                                               #:guile-version guile-version)))
 | 
				
			||||||
| 
						 | 
					@ -401,6 +401,10 @@ the modules, and DEPENDENCIES, a list of packages depended on.  COMMAND is the
 | 
				
			||||||
                       (symlink #$command
 | 
					                       (symlink #$command
 | 
				
			||||||
                                (string-append #$output "/bin/guix"))
 | 
					                                (string-append #$output "/bin/guix"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                       (when #$daemon
 | 
				
			||||||
 | 
					                         (symlink (string-append #$daemon "/bin/guix-daemon")
 | 
				
			||||||
 | 
					                                  (string-append #$output "/bin/guix-daemon")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                       (let ((modules (string-append #$output
 | 
					                       (let ((modules (string-append #$output
 | 
				
			||||||
                                                     "/share/guile/site/"
 | 
					                                                     "/share/guile/site/"
 | 
				
			||||||
                                                     (effective-version)))
 | 
					                                                     (effective-version)))
 | 
				
			||||||
| 
						 | 
					@ -611,6 +615,15 @@ the modules, and DEPENDENCIES, a list of packages depended on.  COMMAND is the
 | 
				
			||||||
                                      #:guile-version guile-version)))
 | 
					                                      #:guile-version guile-version)))
 | 
				
			||||||
           (whole-package name built-modules dependencies
 | 
					           (whole-package name built-modules dependencies
 | 
				
			||||||
                          #:command command
 | 
					                          #:command command
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                          ;; Include 'guix-daemon'.  XXX: Here we inject an
 | 
				
			||||||
 | 
					                          ;; older snapshot of guix-daemon, but that's a good
 | 
				
			||||||
 | 
					                          ;; enough approximation for now.
 | 
				
			||||||
 | 
					                          #:daemon (module-ref (resolve-interface
 | 
				
			||||||
 | 
					                                                '(gnu packages
 | 
				
			||||||
 | 
					                                                      package-management))
 | 
				
			||||||
 | 
					                                               'guix-daemon)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                          #:info (info-manual source)
 | 
					                          #:info (info-manual source)
 | 
				
			||||||
                          #:guile-version guile-version)))
 | 
					                          #:guile-version guile-version)))
 | 
				
			||||||
        ((= 0 pull-version)
 | 
					        ((= 0 pull-version)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue