Commit graph

7 commits

Author SHA1 Message Date
Nicolas Graves
4a33614dd9
build-system: Introduce @* macro for lazy module resolution.
* guix/build-system.scm (@*): New macro for runtime module resolution.
* guix/build-system/agda.scm (default-agda): Use @* instead of
resolve-interface and module-ref.
* guix/build-system/android-ndk.scm (default-android-build,
default-android-googletest): Likewise.
* guix/build-system/ant.scm (default-jdk, default-ant, default-zip):
Likewise.
* guix/build-system/cargo.scm (default-rust): Likewise.
* guix/build-system/chicken.scm (default-chicken): Likewise.
* guix/build-system/composer.scm (default-php,
default-composer-classloader): Likewise.
* guix/build-system/dub.scm (default-ldc, default-dub,
default-pkg-config, default-ld-gold-wrapper): Likewise.
* guix/build-system/elm.scm (default-elm, default-elm-core,
default-elm-json): Likewise.
* guix/build-system/emacs.scm (default-emacs): Likewise.
* guix/build-system/glib-or-gtk.scm (default-glib): Likewise.
* guix/build-system/go.scm (default-go, default-gccgo, make-go-std):
Likewise.
* guix/build-system/haskell.scm (default-haskell): Likewise.
* guix/build-system/julia.scm (default-julia): Likewise.
* guix/build-system/linux-module.scm (default-linux): Likewise.
* guix/build-system/luanti.scm (default-optipng, default-luanti,
default-luanti-game, default-xvfb-run): Likewise. Remove otherwise
unused individual plugin accessor functions.
* guix/build-system/maven.scm (default-maven, default-jdk,
default-maven-plugins): Likewise. Remove otherwise unused individual
plugin accessor functions.
* guix/build-system/meson.scm (default-ninja, default-meson):
Likewise.
* guix/build-system/minify.scm (default-esbuild): Use @* instead of
resolve-interface and module-ref.
* guix/build-system/mix.scm (default-elixir-hex,
default-rebar3, default-elixir): Likewise.
* guix/build-system/node.scm (default-node): Likewise.
* guix/build-system/ocaml.scm (default-ocaml, default-findlib,
default-dune-build-system, default-ocaml4.07,
default-ocaml4.07-findlib ,default-ocaml4.07-dune, default-ocaml4.09,
default-ocaml4.09-findlib, default-ocaml4.09-dune, default-ocaml5.0,
default-ocaml5.0-findlib, default-ocaml5.0-dune): Likewise.
* guix/build-system/perl.scm (default-perl): Likewise.
* guix/build-system/pyproject.scm (default-python): Likewise.
* guix/build-system/qt.scm (default-qtbase): Likewise.
* guix/build-system/r.scm (default-r): Likewise.
* guix/build-system/rakudo.scm (default-rakudo, default-prove6,
default-zef): Likewise.
* guix/build-system/rebar.scm (default-rebar3, default-erlang):
Likewise.
* guix/build-system/renpy.scm (default-renpy): Likewise.
* guix/build-system/ruby.scm (default-ruby): Likewise.
* guix/build-system/scons.scm (default-scons): Likewise.
* guix/build-system/texlive.scm (default-texlive-bin,
texlive-latex-bin): Likewise.
* guix/build-system/tree-sitter.scm (default-guile-json,
default-node, default-tree-sitter, default-tree-sitter-cli): Likewise.
* guix/build-system/vim.scm (default-vim, default-neovim): Likewise.
* guix/build-system/zig.scm (default-zig): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-09-04 12:19:55 +02:00
Ludovic Courtès
46135ce4ce
packages: Add 'package-with-c-toolchain'.
* guix/build-system.scm (build-system-with-c-toolchain): New procedure.
* guix/packages.scm (package-with-c-toolchain): New procedure.
* tests/packages.scm ("package-with-c-toolchain"): New test.
* doc/guix.texi (package Reference): Document 'package-with-c-toolchain'.
(Build Systems): Mention it.
2020-10-12 18:23:47 +02:00
Ludovic Courtès
d3d337d2d8 build-system: Bags record their system and target.
* guix/build-system.scm (<bag>)[system, target]: New fields.
  (make-bag): Add #:system parameter and pass it to LOWER.
* gnu/packages/bootstrap.scm (make-raw-bag): Initialize 'system' field.
* guix/build-system/cmake.scm (lower): Likewise.
* guix/build-system/perl.scm (lower): Likewise.
* guix/build-system/python.scm (lower): Likewise.
* guix/build-system/ruby.scm (lower): Likewise.
* guix/build-system/trivial.scm (lower): Likewise.
* guix/build-system/gnu.scm (lower): Initialize 'system' and 'target'
  fields.
* guix/packages.scm (bag->derivation, bag->cross-derivation): New
  procedures.
  (package-derivation, package-cross-derivation): Use 'bag->derivation'.
* tests/packages.scm ("search paths"): Initialize 'system' and 'target'
  fields.
  ("package->bag", "package->bag, cross-compilation", "bag->derivation",
  "bag->derivation, cross-compilation"): New tests.
2014-10-05 21:58:42 +02:00
Ludovic Courtès
0d5a559f0f build-system: Introduce "bags" as an intermediate representation.
* guix/build-system.scm (<build-system>)[build, cross-build]: Remove.
  [lower]: New field.
  (<bag>): New record type.
  (make-bag): New procedure.
* guix/packages.scm (bag-transitive-inputs, bag-transitive-build-inputs,
  bag-transitive-host-inputs, bag-transitive-target-inputs,
  package->bag): New procedures.
  (package-derivation): Use it; use the bag, apply its build procedure,
  etc.
  (package-cross-derivation): Likewise.
* gnu/packages/bootstrap.scm (raw-build, make-raw-bag): New procedure.
  (%bootstrap-guile): Use them.
* guix/build-system/trivial.scm (lower): New procedure.
  (trivial-build, trivial-cross-build): Remove 'source' parameter.  Pass
  INPUTS as is.
  (trivial-build-system): Adjust accordingly.
* guix/build-system/gnu.scm (%store, inputs-search-paths,
  standard-search-paths, expand-inputs, standard-inputs): Remove.
  (gnu-lower): New procedure.
  (gnu-build): Remove 'source' and #:implicit-inputs? parameters.
  Remove 'implicit-inputs' and 'implicit-search-paths' variables.  Get
  the source from INPUT-DRVS.
  (gnu-cross-build): Likewise.
  (standard-cross-packages): Remove call to 'standard-packages'.
  (standard-cross-inputs, standard-cross-search-paths): Remove.
  (gnu-build-system): Remove 'build' and 'cross-build'; add 'lower'.
* guix/build-system/cmake.scm (lower): New procedure.
  (cmake-build): Remove 'source' and #:cmake parameters.  Use INPUTS and
  SEARCH-PATHS as is.  Get the source from INPUTS.
* guix/build-system/perl.scm: Likewise.
* guix/build-system/python.scm: Likewise.
* guix/build-system/ruby.scm: Likewise.
* gnu/packages/cross-base.scm (cross-gcc): Change "cross-linux-headers"
  to "linux-headers".
  (cross-libc)[xlinux-headers]: Pass #:implicit-cross-inputs? #f.
  Likewise.  In 'propagated-inputs', change "cross-linux-headers" to
  "linux-headers".
* guix/git-download.scm (git-fetch): Use 'standard-packages' instead of
  'standard-inputs'.
* tests/builders.scm ("gnu-build-system"): Remove use of
  'build-system-builder'.
  ("gnu-build"): Remove 'source' and #:implicit-inputs? arguments to
  'gnu-build'.
* tests/packages.scm ("search paths"): Adjust to new build system API.
  ("package-cross-derivation, no cross builder"): Likewise.
* doc/guix.texi (Build Systems): Add paragraph on bags.
2014-10-05 21:58:42 +02:00
Ludovic Courtès
c0cd1b3ea7 Move record utilities to (guix records).
* guix/utils.scm (define-record-type*): Move to...
* guix/records.scm: ... here.  New file.
* guix/build-system.scm, guix/packages.scm: Use it.
* guix/gnu-maintenance.scm: Likewise.
  (official-gnu-packages)[alist->record]: Remove.
* guix/scripts/substitute-binary.scm: Likewise.
  (alist->record, object->fields): Remove.
* tests/utils.scm ("define-record-type*", "define-record-type* with
  letrec* behavior", "define-record-type* & inherit",
  "define-record-type* & inherit & letrec* behavior",
  "define-record-type* & thunked", "define-record-type* & thunked &
  default", "define-record-type* & thunked & inherited"): Move to...
* tests/records.scm: ... here.  New file.
2013-05-12 15:46:16 +02:00
Ludovic Courtès
233e76769a Update license headers.
Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:

  (use-modules (guix build utils)
	       (srfi srfi-1))

  (fluid-set! %default-port-encoding "UTF-8")

  (substitute* (remove (lambda (f)
			 (or (string-contains f ".tar.")
			     (string-contains f ".git/")
			     (string-contains f ".so")
			     (string-suffix? ".o" f)
			     (string-suffix? ".a" f)
			     (string-suffix? ".go" f)
			     (string-suffix? ".pdf" f)
			     (string-suffix? ".png" f)
			     (string-suffix? ".info" f)
			     (equal? (basename f) "guix-daemon")
			     (equal? (basename f) "nix-setuid-helper")
			     (string-contains f "nix-upstream/")
			     (string-contains f "distro/packages/bootstrap/")))
		       (find-files "." "\\.[a-z]+$"))
    (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
     (string-append comment-start " This file is part of GNU Guix."))
    (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
     (string-append comment-start
		    " GNU Guix --- Functional package management for GNU\n"))
    (("^([[:graph:]]+) Guix is " _ comment-start)
     (string-append comment-start " GNU Guix is "))
    (("^([[:graph:]]+) along with Guix." _ comment-start)
     (string-append comment-start " along with GNU Guix."))
    (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
     (string-append comment-start " Copyright ©")))

Change headers using C-style comments manually.
2013-01-06 00:47:50 +01:00
Ludovic Courtès
208f7cd155 Abstract build systems.
* Makefile.am (MODULES): Add `guix/build-system.scm' and
  `guix/build-system/gnu.scm'.  Remove `guix/gnu-build-system.scm'.

* guix/build-system.scm: New file.
* guix/gnu-build-system.scm: Rename to...
* guix/build-system/gnu.scm: ... this.
  (gnu-build-system): New variable.

* tests/builders.scm: Adjust `use-module' clauses.
  ("gnu-build-system"): New test.
2012-06-27 23:58:07 +02:00