X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/ba326ce41b5784f3acb99d4beae5ffc455d6a27e..08ba7ff318720d926215de83daed0da628908ca3:/distro.scm diff --git a/distro.scm b/distro.scm index 2d441f450b..c2d3d1fa40 100644 --- a/distro.scm +++ b/distro.scm @@ -1,20 +1,20 @@ -;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- -;;; Copyright (C) 2012 Ludovic Courtès +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2012 Ludovic Courtès ;;; -;;; This file is part of Guix. +;;; This file is part of GNU Guix. ;;; -;;; Guix is free software; you can redistribute it and/or modify it +;;; 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. ;;; -;;; Guix is distributed in the hope that it will be useful, but +;;; 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 Guix. If not, see . +;;; along with GNU Guix. If not, see . (define-module (distro) #:use-module (guix packages) @@ -26,6 +26,7 @@ #:export (search-patch search-bootstrap-binary %patch-directory + %bootstrap-binaries-path fold-packages find-packages-by-name)) @@ -38,23 +39,21 @@ (define _ (cut gettext <> "guix")) -(define not-colon - ;; The char set that contains all the characters but `:'. - (char-set-complement (char-set #\:))) +;; By default, we store patches and bootstrap binaries alongside Guile +;; modules. This is so that these extra files can be found without +;; requiring a special setup, such as a specific installation directory +;; and an extra environment variable. One advantage of this setup is +;; that everything just works in an auto-compilation setting. (define %patch-path (make-parameter - (or (and=> (getenv "DISTRO_PATCH_PATH") - (cut string-tokenize <> not-colon)) - (compile-time-value - (list (getenv "DISTRO_INSTALLED_PATCH_DIRECTORY")))))) + (map (cut string-append <> "/distro/packages/patches") + %load-path))) (define %bootstrap-binaries-path (make-parameter - (or (and=> (getenv "DISTRO_BOOTSTRAP_PATH") - (cut string-tokenize <> not-colon)) - (compile-time-value - (list (getenv "DISTRO_INSTALLED_BOOTSTRAP_DIRECTORY")))))) + (map (cut string-append <> "/distro/packages/bootstrap") + %load-path))) (define (search-patch file-name) "Search the patch FILE-NAME."