me
/
guix
Archived
1
0
Fork 0

build: Add dependency on Git.

* configure.ac: Check for ‘git’ and substitute ‘GIT’.
* guix/config.scm.in (%git): New variable.
* guix/self.scm (compiled-guix): Define ‘git’ and pass it to
‘make-config.scm’.
(make-config.scm): Add #:git; emit a ‘%git’ variable.
* doc/guix.texi (Requirements): Add it.
Ludovic Courtès 2023-09-11 14:54:29 +02:00
parent 95f2123135
commit f651a35969
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
4 changed files with 22 additions and 2 deletions

View File

@ -201,6 +201,13 @@ AC_SUBST([GZIP])
AC_SUBST([BZIP2]) AC_SUBST([BZIP2])
AC_SUBST([XZ]) AC_SUBST([XZ])
dnl Git is now required for the "builtin:git-download" derivation builder.
AC_PATH_PROG([GIT], [git])
if test "x$GIT" = "x"; then
AC_MSG_ERROR([Git is missing; please install it.])
fi
AC_SUBST([GIT])
LIBGCRYPT_LIBDIR="no" LIBGCRYPT_LIBDIR="no"
LIBGCRYPT_PREFIX="no" LIBGCRYPT_PREFIX="no"

View File

@ -1011,6 +1011,7 @@ version 0.1.0 or later;
@item @item
@uref{https://gitlab.com/guile-git/guile-git, Guile-Git}, version 0.5.0 @uref{https://gitlab.com/guile-git/guile-git, Guile-Git}, version 0.5.0
or later; or later;
@item @uref{https://git-scm.com, Git} (yes, both!);
@item @uref{https://savannah.nongnu.org/projects/guile-json/, Guile-JSON} @item @uref{https://savannah.nongnu.org/projects/guile-json/, Guile-JSON}
4.3.0 or later; 4.3.0 or later;
@item @url{https://www.gnu.org/software/make/, GNU Make}. @item @url{https://www.gnu.org/software/make/, GNU Make}.

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012-2016, 2018-2019, 2021, 2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org> ;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -35,6 +35,7 @@
%config-directory %config-directory
%system %system
%git
%gzip %gzip
%bzip2 %bzip2
%xz)) %xz))
@ -109,6 +110,9 @@
(define %system (define %system
"@guix_system@") "@guix_system@")
(define %git
"@GIT@")
(define %gzip (define %gzip
"@GZIP@") "@GZIP@")

View File

@ -69,6 +69,7 @@
("gzip" . ,(ref 'compression 'gzip)) ("gzip" . ,(ref 'compression 'gzip))
("bzip2" . ,(ref 'compression 'bzip2)) ("bzip2" . ,(ref 'compression 'bzip2))
("xz" . ,(ref 'compression 'xz)) ("xz" . ,(ref 'compression 'xz))
("git-minimal" . ,(ref 'version-control 'git-minimal))
("po4a" . ,(ref 'gettext 'po4a)) ("po4a" . ,(ref 'gettext 'po4a))
("gettext-minimal" . ,(ref 'gettext 'gettext-minimal)) ("gettext-minimal" . ,(ref 'gettext 'gettext-minimal))
("gcc-toolchain" . ,(ref 'commencement 'gcc-toolchain)) ("gcc-toolchain" . ,(ref 'commencement 'gcc-toolchain))
@ -826,6 +827,9 @@ itself."
(define guile-lzma (define guile-lzma
(specification->package "guile-lzma")) (specification->package "guile-lzma"))
(define git
(specification->package "git-minimal"))
(define dependencies (define dependencies
(append-map transitive-package-dependencies (append-map transitive-package-dependencies
(list guile-gcrypt guile-gnutls guile-git guile-avahi (list guile-gcrypt guile-gnutls guile-git guile-avahi
@ -999,6 +1003,7 @@ itself."
=> ,(make-config.scm #:gzip gzip => ,(make-config.scm #:gzip gzip
#:bzip2 bzip2 #:bzip2 bzip2
#:xz xz #:xz xz
#:git git
#:package-name #:package-name
%guix-package-name %guix-package-name
#:package-version #:package-version
@ -1104,7 +1109,7 @@ itself."
(%storedir . "/gnu/store") (%storedir . "/gnu/store")
(%sysconfdir . "/etc"))) (%sysconfdir . "/etc")))
(define* (make-config.scm #:key gzip xz bzip2 (define* (make-config.scm #:key gzip xz bzip2 git
(package-name "GNU Guix") (package-name "GNU Guix")
(package-version "0") (package-version "0")
(channel-metadata #f) (channel-metadata #f)
@ -1134,6 +1139,7 @@ itself."
%state-directory %state-directory
%store-database-directory %store-database-directory
%config-directory %config-directory
%git
%gzip %gzip
%bzip2 %bzip2
%xz)) %xz))
@ -1176,6 +1182,8 @@ itself."
;; information is used by (guix describe). ;; information is used by (guix describe).
'#$channel-metadata) '#$channel-metadata)
(define %git
#+(and git (file-append git "/bin/git")))
(define %gzip (define %gzip
#+(and gzip (file-append gzip "/bin/gzip"))) #+(and gzip (file-append gzip "/bin/gzip")))
(define %bzip2 (define %bzip2