gnu: containerd: Update to 1.4.4.
[jackhill/guix/guix.git] / gnu / packages / commencement.scm
index 41d7772..d4511ed 100644 (file)
@@ -8,6 +8,8 @@
 ;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -140,7 +142,7 @@ pure Scheme to Tar and decompression in one easy step.")
     (name "gash-boot")
     (source (origin
               (inherit (package-source gash))
-              (modules '())))
+              (snippet #f)))            ;discard snippet for Guile 3.0 support
     (arguments
      `(#:implicit-inputs? #f
        #:tests? #f
@@ -170,6 +172,10 @@ pure Scheme to Tar and decompression in one easy step.")
   (package
     (inherit gash-utils)
     (name "gash-utils-boot")
+    (source (origin
+              (inherit (package-source gash-utils))
+              (patches '())
+              (snippet #f)))            ;discard snippet for Guile 3.0 support
     (arguments
      `(#:implicit-inputs? #f
        #:tests? #f
@@ -376,7 +382,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
     (inputs '())
     (propagated-inputs '())
     (native-inputs
-     `(("nyacc-source" ,(origin (inherit (package-source nyacc))
+     `(("nyacc-source" ,(origin (inherit (package-source nyacc-0.99))
                                 (snippet #f)))
        ("mes" ,%bootstrap-mes-rewired)
        ("mescc-tools" ,%bootstrap-mescc-tools)
@@ -472,7 +478,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
     (propagated-inputs '())
     (native-inputs
      `(("mes" ,mes-boot)
-       ("nyacc-source" ,(origin (inherit (package-source nyacc))
+       ("nyacc-source" ,(origin (inherit (package-source nyacc-0.99))
                                 (snippet #f)))
        ("mescc-tools" ,%bootstrap-mescc-tools)
        ,@(%boot-gash-inputs)))
@@ -783,14 +789,17 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
              (substitute* "config.h"
                (("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
              (let ((config.h (open-file "config.h" "a")))
-               (display (string-append "
+               (display (string-append
+                         ;; XXX TODO: remove nested ,(string-append ...) and
+                         ;; store file name on next rebuild cycle
+                         ,(string-append "
 // tcc: error: undefined symbol 'enable_hostname_completion'
 #define enable_hostname_completion(on_or_off) 0
 
-// /gnu/store/cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
+// /gnu/store/" "cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
 #define HAVE_POSIX_SIGNALS 1
 #define endpwent(x) 0
-")
+"))
                         config.h)
                (close config.h))
              #t))
@@ -2810,6 +2819,13 @@ exec " gcc "/bin/" program
                            "--disable-shared"
                            "--enable-languages=c,c++"
 
+                           ;; boot-triplet inserts "guix" in the triplet.
+                           ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet))
+                                 ;; On POWER9 (little endian) glibc needs the
+                                 ;; 128-bit long double type.
+                                 '("--with-long-double-128")
+                                 '())
+
                            ;; libstdc++ cannot be built at this stage
                            ;; ("Link tests are not allowed after
                            ;; GCC_NO_EXECUTABLES.").
@@ -3217,7 +3233,15 @@ memoized as a function of '%current-system'."
                      ;; built, since it requires Linux headers.
                      (("'linux', ") ""))
                    #t))
-               (delete 'set-TZDIR)))
+               (delete 'set-TZDIR)
+               ,@(if (hurd-system?)
+                     `((add-before 'build 'fix-regen
+                         (lambda* (#:key inputs #:allow-other-keys)
+                           (let ((libc (assoc-ref inputs "libc")))
+                             (substitute* "Lib/plat-generic/regen"
+                               (("/usr/include/") (string-append libc "/include/")))
+                             #t))))
+                     '())))
            ((#:tests? _ #f) #f))))))
 
 (define/system-dependent ld-wrapper-boot0
@@ -3291,7 +3315,11 @@ memoized as a function of '%current-system'."
      `(("bison" ,bison-boot0)
        ("texinfo" ,texinfo-boot0)
        ("perl" ,perl-boot0)
-       ("python" ,python-boot0)))
+       ("python" ,python-boot0)
+       ,@(if (target-powerpc?)
+           `(("powerpc64le-patch" ,@(search-patches
+                                      "glibc-ldd-powerpc.patch")))
+           '())))
     (inputs
      `( ;; The boot inputs.  That includes the bootstrap libc.  We don't want
        ;; it in $CPATH, hence the 'pre-configure' phase above.
@@ -3442,6 +3470,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
 
    ;; This time we need 'msgfmt' to install all the libc.mo files.
    (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
+                     ,@(if (target-powerpc?)
+                         `(("powerpc64le-patch" ,@(search-patches
+                                                    "glibc-ldd-powerpc.patch")))
+                         '())
                     ("gettext" ,gettext-boot0)))
 
    (propagated-inputs
@@ -3482,9 +3514,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
-       #:allowed-references ("out" ,glibc-final)
+       #:allowed-references
+       ,@(match (%current-system)
+         ((? target-powerpc?)
+          `(("out" ,glibc-final ,static-bash-for-glibc)))
+         (_
+          `(("out" ,glibc-final))))
        ,@(package-arguments binutils)))
-    (inputs (%boot2-inputs))))
+    (inputs
+     (match (%current-system)
+       ((? target-powerpc?)
+        `(("bash" ,static-bash-for-glibc)
+          ,@(%boot2-inputs)))
+       (_ (%boot2-inputs))))))
 
 (define libstdc++
   ;; Intermediate libstdc++ that will allow us to build the final GCC
@@ -3820,14 +3862,17 @@ COREUTILS-FINAL vs. COREUTILS, etc."
        '(#:modules ((guix build union))
          #:builder (begin
                      (use-modules (ice-9 match)
+                                  (srfi srfi-1)
                                   (srfi srfi-26)
                                   (guix build union))
 
                      (let ((out (assoc-ref %outputs "out")))
-
-                       (match %build-inputs
-                         (((names . directories) ...)
-                          (union-build out directories)))
+                       (union-build out
+                                    (filter-map (match-lambda
+                                                  (("libc-debug" . _) #f)
+                                                  (("libc-static" . _) #f)
+                                                  ((_ . directory) directory))
+                                                %build-inputs))
 
                        (union-build (assoc-ref %outputs "debug")
                                     (list (assoc-ref %build-inputs
@@ -3837,15 +3882,20 @@ COREUTILS-FINAL vs. COREUTILS, etc."
                                                      "libc-static")))
                        #t))))
 
-      (native-search-paths (package-native-search-paths gcc))
-      (search-paths (package-search-paths gcc))
+      (native-search-paths
+       (append (package-native-search-paths gcc)
+               (package-native-search-paths libc))) ;GUIX_LOCPATH
+      (search-paths
+       (append (package-search-paths gcc)
+               (package-search-paths libc)))
 
       (license (package-license gcc))
       (synopsis "Complete GCC tool chain for C/C++ development")
       (description
        "This package provides a complete GCC tool chain for C/C++ development to
 be installed in user profiles.  This includes GCC, as well as libc (headers and
-binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
+binaries, plus debugging symbols in the @code{debug} output), and Binutils.  GCC
+is the GNU Compiler Collection.")
       (home-page "https://gcc.gnu.org/")
       (outputs '("out" "debug" "static"))
 
@@ -3883,6 +3933,23 @@ binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
 (define-public gcc-toolchain-9
   (make-gcc-toolchain gcc-9))
 
+(define-public gcc-toolchain-10
+  (make-gcc-toolchain gcc-10))
+
+(define-public gcc-toolchain-aka-gcc
+  ;; It's natural for users to try "guix install gcc".  This package
+  ;; automatically "redirects" them to 'gcc-toolchain'.
+  (deprecated-package "gcc" gcc-toolchain-10))
+
+
+(define-public gdc-toolchain-10
+  (package (inherit (make-gcc-toolchain gdc-10))
+    (synopsis "Complete GCC tool chain for D lang development")
+    (description "This package provides a complete GCC tool chain for
+D lang development to be installed in user profiles.  This includes
+gdc, as well as libc (headers and binaries, plus debugging symbols
+in the @code{debug} output), and binutils.")))
+
 ;; Provide the Fortran toolchain package only for the version of gfortran that
 ;; is used by Guix internally to build Fortran libraries, because combining
 ;; code compiled with different versions can cause problems.