;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (test-grafts) #:use-module (guix derivations) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix grafts) #:use-module (guix tests) #:use-module ((gnu packages) #:select (search-bootstrap-binary)) #:use-module (srfi srfi-64) #:use-module (rnrs io ports)) (define %store (open-connection-for-tests)) (define (bootstrap-binary name) (let ((bin (search-bootstrap-binary name (%current-system)))) (and %store (add-to-store %store name #t "sha256" bin)))) (define %bash (bootstrap-binary "bash")) (define %mkdir (bootstrap-binary "mkdir")) (test-begin "grafts") (test-assert "graft-derivation" (let* ((build `(begin (mkdir %output) (chdir %output) (symlink %output "self") (call-with-output-file "text" (lambda (output) (format output "foo/~a/bar" ,%mkdir))) (symlink ,%bash "sh"))) (orig (build-expression->derivation %store "graft" build #:inputs `(("a" ,%bash) ("b" ,%mkdir)))) (one (add-text-to-store %store "bash" "fake bash")) (two (build-expression->derivation %store "mkdir" '(call-with-output-file %output (lambda (port) (display "fake mkdir" port))))) (graft (graft-derivation %store orig (list (graft (origin %bash) (replacement one)) (graft (origin %mkdir) (replacement two)))))) (and (build-derivations %store (list graft)) (let ((two (derivation->output-path two)) (graft (derivation->output-path graft))) (and (string=? (format #f "foo/~a/bar" two) (call-with-input-file (string-append graft "/text") get-string-all)) (string=? (readlink (string-append graft "/sh")) one) (string=? (readlink (string-append graft "/self")) graft)))))) (test-end) (exit (= (test-runner-fail-count (test-runner-current)) 0)) 2021-05-04locale: Remove glibc 2.29 from '%default-locale-libcs'....Having 2.29 is most likely no longer justified. Removing it reduces the closure size returned by: guix size $(guix system build gnu/system/install.scm) from 1.6G to 1.5G. * gnu/system/locale.scm (%default-locale-libcs): Remove GLIBC-2.29. Ludovic Courtès 2020-09-20gnu: glibc: Add version 2.31....* gnu/packages/base.scm (glibc-2.31): New variable. * gnu/system/locale.scm (%default-locale-libcs): Add it. Ludovic Courtès 2020-08-26system: locale: Only use the current glibc....Only use the current glibc, as adding glibc-2.29 for compatibility adds ~100MiB to the barebones system closure. * gnu/system/locale.scm (%default-locale-libcs): Remove glibc-2.29. Mathieu Othacehe 2020-05-15locale: Use the native gzip and libc when building locales....This fixes system cross-compilation. * gnu/system/locale.scm (single-locale-directory)[build]: Use the native GZIP and LIBC. Ludovic Courtès 2020-05-03locale: Add glibc 2.29 to '%default-locale-libcs'....This eases transition for anyone reconfiguring and still having profiles with packages using the former libc. * gnu/system/locale.scm (%default-locale-libcs): Add GLIBC-2.29. Ludovic Courtès 2020-02-12system: locale: Remove canonical-package call....This is a follow-up of dfc8ccbf5da96a67eb1cade499f0def21e7fdb02. Building locales using the same glibc as the one programs are linked against is enough. * gnu/system/locale.scm (%default-locale-libcs): Use the plain glibc package. Mathieu Othacehe 2020-02-11system: Stop using canonical-package....Usage of canonical-package outside of thunked fields breaks cross-compilation, see: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00410.html. * gnu/installer.scm (installer-program): Remove canonical-package. * gnu/services/base.scm (<nscd-cache>): Ditto, (%base-services): ditto. * gnu/services/xorg.scm: Remove useless canonical-package import. * gnu/system.scm (%base-packages): Remove canonical-package. * gnu/system/install.scm (%installation-services): Ditto, (installation-os): ditto. * gnu/system/locale.scm (single-locale-directory): Ditto. Mathieu Othacehe