summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* build-system/meson: Support cross-compilation.Maxime Devos2021-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. All operating systems and targets supported by Guix are theoretically supported, but only aarch64-linux-gnu, powerpc64le-linux-gnu and arm-linux-gnueabihf have been tested. i686-linux-gnu has also been tested with a previous version of this patch series but required some changes to 'cross-base.scm'. This has been tested with: $ ./pre-inst-env guix build glib --target=TARGET * guix/build/meson-configuration.scm (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* libelf: Update configure script and config.guess and config.sub.Maxime Devos2021-07-14
| | | | | | | | | | | | | | | The current configure script is too old to find the cross-compiler and support variables passed as arguments. Also, config.guess and config.sub are too old to recognise powerpc64 and aarch64. Solve this by regenerating the 'configure' script and replacing 'config.guess' and 'config.sub'. * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{configure}: Remove phase. (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script and replace 'config.guess' and 'config.sub'. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* glib: Look up "tzdata" in 'native-inputs', not 'inputs'.Maxime Devos2021-07-14
| | | | | | | | | | | Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* glib: Verify the cross-compiled python is used in installed scripts.Maxime Devos2021-07-14
| | | | | | | * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* glib: Use a correct python in scripts when cross-compiling.Maxime Devos2021-07-14
| | | | | | | | | | | | | During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Extract logic for computing CONFIGURE_TARGET_ARCH.Maxime Devos2021-07-14
| | | | | | | | | | | By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Move all man pages to separate output, not only man3.Maxime Devos2021-07-14
| | | | | | | | | | | There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Move documentation instead of copying and deleting it.Maxime Devos2021-07-14
| | | | | | | | | * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Use G-exp machinery for referring to outputs.Maxime Devos2021-07-14
| | | | | | | | | | | | This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Make the #:phases argument a G-expression.Maxime Devos2021-07-14
| | | | | | | | | | This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Remove trailing #t from phases.Maxime Devos2021-07-14
| | | | | | | * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* python: Fix reference to input when cross-compiling.Maxime Devos2021-07-14
| | | | | | | | | | "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* libgpg-error: Fix cross-compilation error.Maxime Devos2021-07-14
| | | | | | | | | | TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* libgpg-error: Prevent silent miscompilation some systems.Maxime Devos2021-07-14
| | | | | | | | | | | * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* libgpg-error: Remove trailing #f from phases.Maxime Devos2021-07-14
| | | | | | | | | These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* tzdata: Don't bother with cross-compiling.Maxime Devos2021-07-14
| | | | | | | | | | | | The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* net-base: Don't cross-compile.Maxime Devos2021-07-14
| | | | | | | | | | | net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* packages: Define this-package-input and this-package-native-input.Maxime Devos2021-07-14
| | | | | | | | | | | | | These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* utils: Define a target-x86-32? and target-x86-64? predicate.Maxime Devos2021-07-14
| | | | | | | * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* utils: Give 'target-mingw?' a docstring.Maxime Devos2021-07-14
| | | | | | | | | | target-hurd? and target-linux? have docstrings, but target-mingw? doesn't. * guix/utils.scm (target-mingw?): Add a docstring. Reported-By: Mathieu Othacehe <othacehe@gnu.org> Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* utils: Define 'target-hurd?' predicate.Maxime Devos2021-07-14
| | | | | | | | | | | | | | | | | | | | | | | It behaves similarily to the other target-...? procedures. The usage of hurd-triplet? / target-hurd? in libgc appears incorrect to me, as (%current-system) is normally never false. * gnu/packages/hurd.scm (hurd-triplet?): Move to ... * guix/util.scm (target-hurd?): ... here, let its argument default to (%current-target-system) or (%current-system), and write a docstring. * gnu/packages/hurd.scm (hurd-target?, hurd-system?): Use target-hurd? instead of hurd-triplet?. * gnu/packages/bdw-gc.scm (libgc): Likewise. * gnu/packages/cross-base.scm (cross-libc)[arguments]<#:configure-flags>: Likewise. (cross-libc)[arguments]<#:phases>: Likewise. (cross-libc)[arguments]<#:native-inputs>: Likewise. * gnu/packages/make-boostrap.scm (%glibc-stripped)[inputs]: Likewise. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* utils: Define 'target-linux?' predicate.Maxime Devos2021-07-14
| | | | | | | | | * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* openssl: Fix indentation.Mathieu Othacehe2021-07-14
| | | | * gnu/packages/tls.scm (openssl): Fix indentation.
* gnu: sdl2: Update to 2.0.14.Vincent Legoll2021-07-13
| | | | | | * gnu/packages/sdl.scm (sdl2): Update to 2.0.14. Signed-off-by: Leo Famulari <leo@famulari.name>
* gnu: openssl: Display configure environment.Efraim Flashner2021-07-13
| | | | | * gnu/packages/tls.scm (openssl)[arguments]: Adjust custom 'configure phase to also show how openssl is configured.
* gnu: openssl: Honor configure-flags.Efraim Flashner2021-07-13
| | | | | * gnu/packages/tls.scm (openssl)[arguments]: Adjust custom 'configure phase to also use configure-flags.
* doc: cookbook: Adjust example to simplified input style.Ludovic Courtès2021-07-12
| | | | | * doc/guix-cookbook.texi (Extended example): Adjust example to new input style and adjust "Inputs" section.
* doc: cookbook: Remove trailing #t from extended example.Ludovic Courtès2021-07-12
| | | | | * doc/guix-cookbook.texi (Extended example): Remove trailing #t from snippet and phases.
* gnu: fontconfig: Don't build PDFs.Ludovic Courtès2021-07-12
| | | | | * gnu/packages/fontutils.scm (fontconfig-with-documentation)[arguments]: Add 'no-pdf-doc' phase.
* gnu: fontconfig: Use (locally) deterministic cachingSarah Morgensen2021-07-11
| | | | | | | | | | | | Make fontconfig use directory contents rather than modification time to determine cache validity (by pretending that mtime is broken). * gnu/packages/patches/fontconfig-cache-ignore-mtime.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/fontutils.scm (fontconfig)[source]: Use it. [arguments]: Unset SOURCE_DATE_EPOCH for tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* news: Add news entry for simplified package inputs.Ludovic Courtès2021-07-11
| | | | * etc/news.scm: Add entry.
* import: elpa: Emit new-style package inputs.Ludovic Courtès2021-07-11
| | | | | | * guix/import/elpa.scm (elpa-package->sexp)[dependencies]: Turn into a list of symbols. [maybe-inputs]: Wrap in 'list' instead of 'quasiquote'.
* import: print: Emit new-style package inputs when possible.Ludovic Courtès2021-07-11
| | | | | | | | * guix/import/print.scm (redundant-input-labels?): New procedure. (package->code)[package-lists->code]: Rename to... [inputs->code]: ... this. When 'redundant-input-labels?' returns true, emit label-less inputs. Adjust callers to new name. * tests/print.scm (pkg-with-inputs): Adjust accordingly.
* import: cran: Emit new-style package inputs.Ludovic Courtès2021-07-11
| | | | | | | * guix/import/cran.scm (format-inputs): Emit symbols or 'specification->package' calls. (maybe-inputs): Wrap in 'list' instead of 'quasiquote'. * tests/cran.scm ("description->package"): Adjust accordingly.
* import: pypi: Emit new-style package inputs.Ludovic Courtès2021-07-11
| | | | | | | | * guix/import/pypi.scm (maybe-inputs): Wrap PACKAGE-INPUTS in 'list' instead of 'quasiquote'. (compute-inputs)[requirement->package-name/sort]: Return a list of symbols. * tests/pypi.scm ("pypi->guix-package, no wheel") ("pypi->guix-package, wheels"): Adjust accordingly.
* packages: 'hidden-package' inherits the original package location.Ludovic Courtès2021-07-11
| | | | * guix/packages.scm (hidden-package): Inherit 'location' from P.
* Add 'guix style'.Ludovic Courtès2021-07-11
| | | | | | | | | * guix/scripts/style.scm, tests/style.scm: New files. * Makefile.am (MODULES, SCM_TESTS): Add them. * po/guix/POTFILES.in: Add 'guix/scripts/style.scm'. * doc/guix.texi (Invoking guix style): New node. (package Reference): Reference it. (Invoking guix lint): Likewise.
* utils: 'edit-expression' copies part of the original source map.Ludovic Courtès2021-07-11
| | | | | | | * guix/utils.scm (source-location-key/stamp): New procedure. (go-to-location): Use it. (move-source-location-map!): New procedure. (edit-expression): Call it.
* utils: 'edit-expression' modifies the file only if necessary.Ludovic Courtès2021-07-11
| | | | * guix/utils.scm (edit-expression): Check whether STR* equals STR.
* utils: Add 'go-to-location' with source location caching.Ludovic Courtès2021-07-11
| | | | | | | | * guix/utils.scm (%source-location-map): New variable. (go-to-location): New procedure. (edit-expression): Use it instead of custom loop. * guix/packages.scm (package-field-location)[goto]: Remove. Use 'go-to-location' instead of 'goto'.
* utils: 'edit-expression' no longer leaks file ports.Ludovic Courtès2021-07-11
| | | | | * guix/utils.scm (edit-expression): Use 'call-with-input-file' to make sure IN gets closed.
* gnu: Change inputs of core packages to plain lists.Ludovic Courtès2021-07-11
| | | | | | | | | | | | | This is transparent: the resulting derivations are unchanged. * gnu/packages/base.scm (grep, sed, tar, patch, diffutils, glibc/hurd-headers) (coreutils, gnu-make, make-glibc-utf8-locales): Change input fields to plain package lists and use 'modify-inputs'. * gnu/packages/guile.scm (guile-1.8, guile-json-1, guile-json-3) (guile-gdbm-ffi, guile-sqlite3, guile-bytestructures) (guile-git, guile-zlib, guile-lzlib, guile-zstd, guile-next): Likewise. * gnu/packages/mes.scm (nyacc-0.86, nyacc-0.99) (nyacc, nyacc-1.00.2, mes-0.19, mes, m2-planet): Likewise.
* packages: Add 'modify-inputs'.Ludovic Courtès2021-07-11
| | | | | | | * guix/packages.scm (inputs-sans-labels, replace-input): New procedures. (prepend, replace, modify-inputs): New macros. * doc/guix.texi (Defining Package Variants): Document 'modify-inputs'. * dir-locals.el: Add 'modify-inputs' and its keywords.
* packages: Add 'lookup-package-input' & co.Ludovic Courtès2021-07-11
| | | | | | | * guix/packages.scm (lookup-input, lookup-package-input) (lookup-package-native-input, lookup-package-propagated-input) (lookup-package-direct-input): New procedures. * doc/guix.texi (package Reference): Document them.
* lint: Add 'input-labels' checker.Ludovic Courtès2021-07-11
| | | | | | | | * guix/lint.scm (check-input-labels): New procedure. (%local-checkers): Add 'input-labels' checker. * tests/lint.scm ("input labels: no warnings") ("input labels: one warning"): New tests. * doc/guix.texi (Invoking guix lint): Mention it.
* packages: Allow inputs to be plain package lists.Ludovic Courtès2021-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | * guix/packages.scm (add-input-label, sanitize-inputs): New procedures. (<package>)[inputs, propagated-inputs, native-inputs]: Add 'sanitize' property. * doc/guix.texi (Defining Packages, package Reference): (Defining Package Variants): Adjust examples accordingly. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades, propagated inputs") ("transaction-upgrade-entry, grafts") ("package-transitive-inputs") ("package-transitive-supported-systems") ("package-closure") ("supported-package?") ("package-derivation, inputs deduplicated") ("package-transitive-native-search-paths") ("package-grafts, indirect grafts") ("package-grafts, indirect grafts, propagated inputs") ("package-grafts, same replacement twice") ("package-grafts, dependency on several outputs") ("replacement also grafted") ("package->bag, sensitivity to %current-target-system") ("package->bag, propagated inputs") ("package->bag, sensitivity to %current-system") ("package-input-rewriting/spec, identity") ("package-input-rewriting, identity"): Use the label-less input style.
* records: Support field sanitizers.Ludovic Courtès2021-07-11
| | | | | | | | | | * guix/records.scm (make-syntactic-constructor): Add #:sanitizers. [field-sanitizer]: New procedure. [wrap-field-value]: Honor F's sanitizer. (define-record-type*)[field-sanitizer]: New procedure. Pass #:sanitizer to 'make-syntactic-constructor'. * tests/records.scm ("define-record-type* & sanitize") ("define-record-type* & sanitize & thunked"): New tests.
* environment: Adjust to earlier 'gcc-bootstrap' search paths changes.Ludovic Courtès2021-07-11
| | | | | | | This is a followup to fe6775f52b7f28a5bf74633ea4737c32a64b7e05. * tests/guix-environment.sh: Expect C_INCLUDE_PATH rather than CPATH in environment containing 'gcc-bootstrap'.
* pack: Adjust test to earlier <compressor> changes.Ludovic Courtès2021-07-11
| | | | | | | This is a followup to 5a0997ef7f3968d216328b8c63a6e36dd29a5ab8, which broke the "self-contained tarball" test. * tests/pack.scm (%gzip-compressor): Add 'list' in third field.
* ci: Build commencement packages supported on the target system.Ludovic Courtès2021-07-10
| | | | | | | | | This is a followup to df49fe2a13d933c640e3189413c5adfced1103c5. * gnu/ci.scm (%bootstrap-packages): Rename to... (commencement-packages): ... this, and turn into a procedure. Filter packages that pass 'supported-package?'. (cuirass-jobs): Adjust accordingly.