a18eda2747
* guix/packages.scm (<search-path-specification>): New record type. (search-path-specification->sexp): New procedure. (<package>)[native-search-paths]: New field. (package-derivation): Accumulate the search paths, and pass them as #:search-paths toe BUILDER. * guix/build-system/gnu.scm (gnu-build): Add #:search-paths. Compute `implicit-search-paths'. Pass #:search-paths in BUILDER. * guix/build-system/perl.scm (perl-build): Add #:search-paths, pass it to BUILDER with the search paths of PERL. * guix/build-system/cmake.scm (cmake-build): Add #:search-paths, pass it to BUILDER. * guix/build-system/trivial.scm (trivial-build): Add #:search-paths, ignore it. * guix/build/gnu-build-system.scm (set-paths): Add #:search-paths. Remove explicit settings of CPATH, LIBRARY_PATH, and PKG_CONFIG_PATH. Instead, walk SEARCH-PATHS and call `set-path-environment-variable' for them. * guix/build/perl-build-system.scm (perl-build): Remove PERL5LIB setting. * tests/packages.scm ("search paths"): New test. * gnu/packages/bootstrap.scm (%bootstrap-guile)[raw]: Add #:search-paths. (%bootstrap-gcc): Add `native-search-paths' field. * gnu/packages/perl.scm (perl): Likewise. * gnu/packages/pkg-config.scm (pkg-config): Likewise. * gnu/packages/glib.scm (intltool): Remove `arguments'. * gnu/packages/avahi.scm (avahi): Remove #:phases.
56 lines
2.2 KiB
Scheme
56 lines
2.2 KiB
Scheme
;;; GNU Guix --- Functional package management for GNU
|
|
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
|
;;;
|
|
;;; 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 <http://www.gnu.org/licenses/>.
|
|
|
|
(define-module (guix build-system trivial)
|
|
#:use-module (guix store)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix derivations)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix build-system)
|
|
#:use-module (ice-9 match)
|
|
#:export (trivial-build-system))
|
|
|
|
(define* (trivial-build store name source inputs
|
|
#:key
|
|
outputs guile system builder (modules '())
|
|
search-paths)
|
|
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
|
|
ignored."
|
|
(define guile-for-build
|
|
(match guile
|
|
((? package?)
|
|
(package-derivation store guile system))
|
|
((and (? string?) (? derivation-path?))
|
|
guile)
|
|
(#f ; the default
|
|
(let* ((distro (resolve-interface '(gnu packages base)))
|
|
(guile (module-ref distro 'guile-final)))
|
|
(package-derivation store guile system)))))
|
|
|
|
(build-expression->derivation store name system builder inputs
|
|
#:outputs outputs
|
|
#:modules modules
|
|
#:guile-for-build guile-for-build))
|
|
|
|
(define trivial-build-system
|
|
(build-system (name 'trivial)
|
|
(description
|
|
"Trivial build system, to run arbitrary Scheme build expressions")
|
|
(build trivial-build)
|
|
(cross-build trivial-build)))
|