aboutsummaryrefslogtreecommitdiff
#!@abs_top_builddir@/guile \
--no-auto-compile -e main -s
!#
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2018 Mathieu Lirzin <mthl@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/>.

;; IMPORTANT: We must avoid loading any modules from Guix here,
;; because we need to adjust the guile load paths first.
;; It's okay to import modules from core Guile though.

(define-syntax-rule (push! elt v) (set! v (cons elt v)))

(define (augment-load-paths!)
  ;; Add installed modules to load-path.
  (push! "@guilemoduledir@" %load-path)
  (push! "@guileobjectdir@" %load-compiled-path))

(define* (main #:optional (args (command-line)))
  (unless (getenv "GUIX_UNINSTALLED")
    (augment-load-paths!))

  (let ((guix-main (module-ref (resolve-interface '(guix ui))
                               'guix-main)))
    (bindtextdomain "guix" "@localedir@")
    (bindtextdomain "guix-packages" "@localedir@")
    ;; XXX: It would be more convenient to change it to:
    ;;   (exit (apply guix-main (command-line)))
    ;; but since the 'guix' command is not updated by 'guix pull', we cannot
    ;; really do it now.
    (apply guix-main args)))

;;; Local Variables:
;;; mode: scheme
;;; End:
7ae29518400d66ef968134f5169'>packages: Reintroduce 'find-newest-available-packages'....Ludovic Courtès 2019-03-14Merge branch 'staging' into core-updatesMarius Bakke 2019-03-11packages: Add the channel .go files to the search path....Ludovic Courtès 2019-02-20Merge branch 'staging' into core-updatesMarius Bakke 2019-02-16packages: Remove duplicates from package cache....Ludovic Courtès 2019-02-06Merge branch 'master' into core-updatesRicardo Wurmus 2019-01-15guix package: '--list-available' can use data from the cache....Ludovic Courtès 2019-01-15edit: Use 'specification->location' to read information from the cache....Ludovic Courtès 2019-01-15channels: Compute a package cache and use it....Ludovic Courtès 2019-01-15packages: Remove 'find-newest-available-packages'....Ludovic Courtès 2018-12-20gnu: Use i686-linux bootstrap binaries on x86_64-linux....Ludovic Courtès 2018-09-02Add (guix describe) and use it to initialize '%package-search-path'....Ludovic Courtès 2018-05-13packages: 'find-packages-by-name' properly honors version prefixes....Ludovic Courtès 2018-04-08discovery: Remove dependency on (guix ui)....Ludovic Courtès 2018-04-08Add (guix self)....Ludovic Courtès 2017-11-07packages: 'fold-packages' takes #:select? parameter....Ludovic Courtès 2017-09-01packages: 'fold-packages' takes an optional 'modules' parameter....Ludovic Courtès 2017-06-11packages: Add 'specifications->manifest'....Ludovic Courtès 2017-05-03Add (guix discovery)....Ludovic Courtès 2017-05-03ui: Rename '_' to 'G_'....Ludovic Courtès 2017-05-01packages: Remove support for PACKAGE-VERSION deprecated syntax....Ludovic Courtès 2017-03-08packages: Use PACKAGE@VERSION syntax when reporting ambiguities....Ludovic Courtès 2017-02-27packages: Add 'search-auxiliary-file'....Alex Kost 2017-01-28Use 'mlambda' instead of 'memoize'....Ludovic Courtès 2017-01-28Add (guix memoization)....Ludovic Courtès