Commit Graph

1235 Commits

Author SHA1 Message Date
Tobias Geerinckx-Rice a1679b74c9
Revert the #51061 patch series for now.
This reverts commits f63c79bf76
..f86f7e24b39928247729020df0134e2e1c4cde62 for more chillax reviewing.

See <https://issues.guix.gnu.org/51061#32>.
2021-10-08 23:31:34 +02:00
Lars-Dominik Braun b74ca403cb
build-system/haskell: Explain failure.
Provide human-readable failure message and explain how to fix it.

* guix/build/haskell-build-system.scm (register): Raise error if source
file does not exist.
2021-10-08 09:13:52 +02:00
Lars-Dominik Braun a01daed62c
build-system/haskell: Accept line breaks in config files.
Long id’s will break to the next line.

* guix/build/haskell-build-system.scm (grep): Remove.
(register): Modify regular expression to account for newlines between
key and value, fail if package id is empty.
2021-10-08 09:13:52 +02:00
Lars-Dominik Braun 7cdb65dc9c
build-system/haskell: Do not rely on compiler name.
We’ve been relying on the compiler name matching its package
subdir. Since we effectively only support GHC we can hard-code this and
avoid issues with “ghc-next”.

* guix/build/haskell-build-system.scm (make-ghc-package-database):
Use GHC_PACKAGE_PATH.
(register): Hard-code ghc prefix.
2021-10-08 09:13:51 +02:00
John Kehayias fe56213027
guix: haskell-build-system: Always pass -package-db option.
* guix/build/haskell-build-system.scm (run-setuphs): Pass -package-db option.

Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
2021-10-08 09:13:46 +02:00
Hartmut Goebel 1660253c3c
build-system: Add 'rebar3-build-system'.
* guix/build-system/rebar3.scm, guix/build/rebar3-build-system.scm: New files.
* Makefile.am (MODULES): Add them.
2021-10-07 22:35:28 +02:00
Ludovic Courtès 6d02a994f9
download: Honor #:verify-certificate? for SWH downloads.
Previously, the SWH + Disarchive fallback could fail with:

  Trying to use Disarchive to assemble /gnu/store/…-ucsim-0.6-pre68.tar.gz...
  Assembling the directory ucsim-0.6-pre68
  Downloading /gnu/store/…-ucsim-0.6-pre68.tar.gz from Software Heritage...
  X.509 certificate of 'archive.softwareheritage.org' could not be verified:
    signer-not-found
    invalid

  Could not resolve directory reference

This will no longer be the case since 'guix perform-download'
passes #:verify-certificate? #f.

* guix/build/download.scm (disarchive-fetch/any): Parameterize
'%verify-swh-certificate?'.
2021-10-07 10:47:43 +02:00
Tobias Geerinckx-Rice bdd190e3aa
build-system: linux-module: Don't explicitly return #t from phases.
* guix/build-system/linux-module.scm (configure): Remove explicit #t return value.
2021-10-01 21:27:35 +02:00
Tobias Geerinckx-Rice 834415c33a
build-system: linux-module: Build and install in parallel.
* guix/build-system/linux-module.scm (linux-module-build)
(guix/build-system/linux-module.scm): Accept the PARALLEL-BUILD? keyword
and pass it on to the builder.
* guix/build/linux-module-build-system.scm (build, install): Capture and
honour it.
2021-10-01 21:27:35 +02:00
Tobias Geerinckx-Rice a939011b58
build-system: linux-module: Normalise the ‘M’ source-directory.
"make modules_install" with an "M=" file name ending in "/." breaks at
least rtl8812au-aircrack-ng-linux-module.  In general, passing a more
human-generated-looking value seems prudent as these are more likely to
be tested upstream.

* guix/build/linux-module-build-system.scm (build, install): Call
CANONICALIZE-PATH on SOURCE-DIRECTORY instead of STRING-APPEND.

Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.
as apteryx on #guix
2021-09-30 07:17:01 +02:00
Liliana Marie Prikler 719bbcc15e
Update copyright assignments for Liliana Marie Prikler.
* doc/guix.texi: Update copyright name for Liliana Marie Prikler.
* gnu/packages/build-tools.scm: Update copyright name and email for Liliana
Marie Prikler.
* gnu/packages/convmv.scm: Likewise.
* gnu/packages/emacs-xyz.scm: Likewise.
* gnu/packages/emacs.scm: Likewise.
* gnu/packages/esolangs.scm: Likewise.
* gnu/packages/game-development.scm: Likewise.
* gnu/packages/games.scm: Likewise.
* gnu/packages/gnome-xyz.scm: Likewise.
* gnu/packages/gnome.scm: Likewise.
* gnu/packages/gstreamer.scm: Likewise.
* gnu/packages/guile-xyz.scm: Likewise.
* gnu/packages/minetest.scm: Likewise.
* gnu/packages/music.scm: Likewise.
* gnu/packages/patches/minetest-add-MINETEST_MOD_PATH.patch: Likewise.
* gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch: Likewise.
* gnu/packages/patches/webkitgtk-bind-all-fonts.patch: Likewise.
* gnu/packages/python-xyz.scm: Likewise.
* gnu/packages/unicode.scm: Likewise.
* gnu/packages/xorg.scm: Likewise.
* gnu/services/sound.scm: Likewise.
* guix/build-system/renpy.scm: Likewise.
* guix/build/emacs-utils.scm: Likewise.
* guix/build/renpy-build-system.scm: Likewise.
2021-09-25 09:34:36 +02:00
Tobias Geerinckx-Rice 348f0c61ef
syscalls: Deduplicate device number conversion.
* guix/cpio.scm (device-number, device->major+minor):
Move to, and subsequently import from, …
* guix/build/syscalls.scm (device-number, device-number->major+minor):
…here.  Note the slight name change.
(mounts): Replace 16-bit open code with a DEVICE-NUMBER call.
* gnu/build/linux-boot.scm (device-number):
Remove duplicate 16-bit implementation in favour of the one above.
(resume-if-hibernated): Reuse DEVICE-NUMBER->MAJOR+MINOR.
2021-09-23 18:17:16 +02:00
Ludovic Courtès 5871639bb1
download: Fall back to web.archive.org as a very last resort.
Suggested by Florian Pelz <pelzflorian@pelzflorian.de>.

* guix/build/download.scm (internet-archive-uri): New procedure.
(url-fetch): Append it to the list of URIs after
CONTENT-ADDRESSED-URIS.
2021-09-22 16:14:39 +02:00
Liliana Marie Prikler c8e2358cca
build-system: linux-module: Support source-directory.
As with guile-build-system, the module to be build need not necessarily live
at the root of the build tree.

* guix/build/linux-module-build-system.scm (build, install): Add
source-directory argument and append it to "M" variable when invoking make.
* guix/build-system/linux-module.scm (linux-module-build): Add
source-directory argument.
2021-09-14 23:27:36 +02:00
Ludovic Courtès 3cb5ae8577
download: Disarchive mirrors can be URL-returning procedures.
As discussed at <https://issues.guix.gnu.org/47336#16>.

* guix/build/download.scm (url-fetch)[disarchive-uris]: Accept MIRROR as
a procedure.
* guix/download.scm (%disarchive-mirrors): Add comment.  This change can
only be made once a 'guix perform-download' that understands procedures
is widely deployed.
2021-09-14 11:50:58 +02:00
Efraim Flashner de4f5df95d
build/go: Support cross compiling.
* guix/build-system/go.scm (go-target): New procedure.
(go-build): Add goarch, goos keywords. Adjust bag depending if doing a
native or cross compile.
(go-cross-build): New procedure.
* guix/build/go-build-system.scm (setup-go-environment): Accept goarch,
goos keywords. Set go environment variables based on target architecture.
* doc/guix.texi (Build Systems): Mention new go-build-system keywords.
2021-09-13 15:33:30 +03:00
pukkamustard f8f94cc544
guix: dune-build-system: Put dune into a reproducible release mode.
* guix/build/dune-build-system.scm (build,check): Replace the profile parameter
with the appropriate release flags.
* guix/build-system/dune.scm: Remove the profile parameter.
* doc/guix.texi: Remove paragraph on profile parameter.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2021-09-08 13:39:27 +02:00
pukkamustard 33a1ec29fa
guix: dune-build-system: Add a profile parameter.
* guix/build-system/dune.scm: Add a profile parameter.
* guix/build/dune-build-system.scm (build): Use it.
* doc/guix.texi: Document it.
* gnu/packages/ocaml.scm: Remove profile being set from build flags.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
2021-08-20 23:51:11 +02:00
Maxime Devos 3df485152c
build-system: Add 'minetest-mod-build-system'.
* guix/build-system/minetest.scm: New module.
* guix/build/minetest-build-system.scm: Likewise.
* Makefile.am (MODULES): Add them.
* doc/guix.texi (Build Systems): Document 'minetest-mod-build-system'.

Signed-off-by: Leo Prikler <leo.prikler@student.tugraz.at>
2021-08-20 12:41:54 +02:00
Charles 385c485c65
build: Update uglifyjs for minify-build-system.
* guix/build-system/minify.scm (default-uglify-js): Update uglifyjs package used.
* guix/build/minify-build-system.scm (minify): Use updated uglifyjs command name.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2021-07-19 14:46:28 +03:00
Maxim Cournoyer c170abba47
build: pack: Mute error output when checking if tar supports --sort.
* guix/build/pack.scm (tar-base-options) [tar-supports-sort?]: Redirect error
output to void.
2021-07-18 02:11:13 -04:00
Tobias Geerinckx-Rice 0dd136bc36
Revert "syscalls: 'terminal-dimension' ignores EPERM."
This reverts commit 17a102332a.
See <https://github.com/koverstreet/bcachefs/pull/277>.
2021-07-07 13:56:16 +02:00
Maxim Cournoyer d5c9cc6d9d
build: qt-utils: Wrappers set 'QTWEBENGINEPROCESS_PATH' if needed.
This reinstate commit the reverted fed28a9632,
now rebased on top of conflicting changes.

* guix/build/qt-utils.scm:  Remove extraneous newlines.
(variables-for-wrapping): Add comments.  Define a file type entry for each
variable definition, and use it to determine if we should look for directories
versus plain files.
<QTWEBENGINEPROCESS_PATH>: New environment variable.
(wrap-all-qt-programs): Remove trailing #t.
2021-07-02 16:50:10 -04:00
Ludovic Courtès 20cf23e4f8
build: qt-utils: Refactor the code to filter XDG_DATA_DIRS.
This partially reinstate the reverted
c5fd1b0bd3.

* guix/build/qt-utils.scm (variables-for-wrapping)[collect-sub-dirs]:
Add 'selectors' parameter and honor it.  Change caller to handle selectors.

Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2021-07-02 16:50:10 -04:00
Jakub Kądziołka 86c9f5a5fa
guix: qt-utils: Don't include useless inputs in wrapped variables.
Include only those inputs into XDG_DATA_DIRS having
some subdirectory of /share which is typically used by Qt.

* guix/build/qt-utils.scm (variables-for-wrapping): Take the
  output directory as an argument for special handling. Check for
  subdirectories of /share used by Qt before including inputs in
  XDG_DATA_DIRS.
  (wrap-qt-program*): Pass the output directory to variables-for-wrapping.

Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
2021-07-02 16:50:09 -04:00
Jakub Kądziołka 76174aa991
build-system: qt: Exclude useless inputs from wrapped variables.
* guix/build-system/qt.scm (qt-build)[qt-wrap-excluded-inputs]: New argument.
* guix/build/qt-utils.scm (%qt-wrap-excluded-inputs): New variable.
  (wrap-qt-program*)[qt-wrap-excluded-inputs]: New argument. Filter excluded
  inputs.
  (wrap-qt-program)[qt-wrap-excluded-inputs]: New argument.
  (wrap-all-qt-programs)[qt-wrap-excluded-inputs]: New argument.

Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
2021-07-02 16:50:09 -04:00
Hartmut Goebel 30759c4aad
guix: qt-utils: Wrapped executables honor user's envvars.
Prior to this change, wrappers did set the specified environment variables to
a fixed value, overwriting any user settings. This inhibited propagating
e.g. XDG_DATA_DIRS from a profile to the application.

Now user environment variables are prefixed (if the variable defines some
"binary" search path, e.g. QT_PLUGIN_PATH) or suffixed (if the variable
defines some config or data search path, e.g. XDG_DATA_DIRS). The code could
also allow to overwrite, anyhow currently no variable is defined like this.

* guix/build/qt-utils.scm (variables-for-wrapping): For each env-var to
  be wrapped, specify whether it should prefix, suffix or overwrite the
  user's variable.
2021-07-02 16:50:09 -04:00
Hartmut Goebel 7e24e1e58d
guix: qt-build-system, qt-utils: Unify wrapping of qt-programs.
Unify (guix qt-build-system wrap-all-programs) and
(guix qt-utils wrap-qt-program), so both behave the same.
The functions now reside in qt-utils to make them easily available for
packages not using the qt-build-system.

* guix/build/qt-build-system.scm (variables-for-wrapping, wrap-all-programs):
  Move from here ...
* guix/build/qt-utils.scm (variables-for-wrapping, wrap-all-qt-programs):
  ... to here. Base the later on
  (wrap-qt-program*): New function, carved out from old wrap-all-programs.
  (wrap-qt-program): Base on wrap-qt-program*, change arguments in an
  incompatible way.
* gnu/packages/bittorrent.scm (qbittorrent)[arguments]<phases>{wrap-qt}:
  Adjust to new interface of wrap-qt-program.
* gnu/packages/finance.scm (electron-cash): Likewise.
* gnu/packages/geo.scm (qgis): Likewise.
* gnu/packages/password-utils.scm (qtpass): Likewise.
* gnu/packages/video.scm (openshot): Likewise.
* gnu/packages/web-browsers.scm (kristall): Likewise.
2021-07-02 16:50:09 -04:00
Maxim Cournoyer 1879b05f90
Revert "build-system/qt: Wrappers only include relevant directories to XDG_DATA_DIRS."
This reverts commit c5fd1b0bd3.  It will need to
be refactored on top of 2214b7b78d.
2021-07-02 16:50:09 -04:00
Maxim Cournoyer 15fd870c3f
Revert "build-system/qt: Wrappers set 'QTWEBENGINEPROCESS_PATH' if needed."
This reverts commit 06eb21856f.  It will need to
be refactored to fit on top of 2214b7b78d.
2021-07-02 16:50:09 -04:00
Maxim Cournoyer 3a94998f5e
Revert "build-system/qt: Fix wrapping with QTWEBENGINEPROCESS_PATH."
This reverts commit fed28a9632.  It will need to
be refactored to fit on top of 2214b7b78d.
2021-07-02 16:50:09 -04:00
Maxim Cournoyer 7708c0b5e3
pack: Factorize base tar options.
* guix/docker.scm (%tar-determinism-options): Move to a new module and rename
to `tar-base-options'.  Adjust references accordingly.
* guix/build/pack.scm: New file.
* Makefile.am (MODULES): Register it.
* guix/scripts/pack.scm (self-contained-tarball/builder): Use it.
2021-06-29 14:53:21 -04:00
Ludovic Courtès b36267b1d9
download: 'tls-wrap' retries handshake upon non-fatal errors.
Fixes <https://bugs.gnu.org/49223>.
Reported by Domagoj Stolfa <ds815@gmx.com>.

* guix/build/download.scm (tls-wrap): Retry up to 5 times when
'handshake' throws a non-fatal error.
2021-06-25 23:44:15 +02:00
Lars-Dominik Braun 9c93573d15
build: Make outputs of node-build-system reproducible.
package.json records two hashes of package.tgz, which change for each
build, resulting in non-reproducible builds.

* guix/build/node-build-system.scm (repack): Add reproducibility options
to tar command.
2021-06-24 14:10:29 +02:00
Ludovic Courtès b9a95420ab
profiles: Build union of inputs in the right order.
Fixes <https://bugs.gnu.org/49102>.
Reported by Mathieu Othacehe <othacehe@gnu.org>
and Tobias Geerinckx-Rice <me@tobias.gr>.

Fixes a regression introduced in
8cef92d063, whereby in case of file
collisions, the "wrong" one would take precedence.

* guix/build/profiles.scm (manifest-sexp->inputs+search-paths): Perform
a breadth-first traversal.  Reverse INPUTS and SEARCH-PATHS in the base
case.
* tests/profiles.scm ("profile-derivation, ordering & collisions"):
New test.
2021-06-22 17:55:05 +02:00
Julien Lepiller 7f902d368d
guix: java-utils: Look for actual jar files.
* guix/build/java-utils.scm (install-from-pom): Fix `find-files` to look
only for jar files.
2021-06-22 13:10:36 +02:00
Julien Lepiller cc09453862
guix: maven: Use a temporary file to fix pom files.
* guix/build/maven/pom.scm (fix-pom-dependencies): Actually use the
temporary file that was created.
2021-06-22 13:10:32 +02:00
Julien Lepiller 5bb3395c42
guix: maven: Look in local packages when searching for package version.
* guix/build/maven/pom.scm (fix-pom-dependencies): Also look at local
packages when looking for a package version.
2021-06-22 13:10:30 +02:00
Julien Lepiller 0db1393b73
guix: maven: Support fixing modules.
* guix/build/maven/pom.scm (fix-pom-dependencies): Support fixing
modules that do not exist.
* guix/build/maven-build-system.scm (fix-pom): Fix modules.
2021-06-22 13:10:28 +02:00
Julien Lepiller 9711970c99
guix: maven: Support fixing extensions.
* guix/build/maven/pom.scm (fix-pom-dependencies): Add support for fixing
extension versions.
2021-06-22 13:10:27 +02:00
Julien Lepiller 6ec2109ab6
guix: maven: Simplify finding local packages and modules.
* guix/build/maven-build-system (fix-pom): Fix a single pom file without
recursing
(fix-pom-files): Find local packages and all submodules, and fix them
all at once.
(add-local-package): Move to...
* guix/build/maven/pom.scm (add-local-package): ...here.
(pom-and-submodules, pom-local-packages): New procedures.
2021-06-22 13:10:24 +02:00
Julien Lepiller 573b43c116
guix: maven: Simplify finding version and group information.
* guix/build/maven/pom.scm (pom-version, pom-groupid): Do not use inputs
and local packages information anymore. Adapt file to new arguments.
* guix/build/maven-build-system.scm: Adapt to new arguments.
* guix/build/java-utils.scm: Adapt to new arguments.
2021-06-22 13:09:57 +02:00
Julien Lepiller 4c98db94b0
guix: java-utils: Factorize pom.xml generation.
* guix/build/java-utils.scm (generate-pom.xml): New procedure.
* gnu/packages/maven.scm (java-surefire-junit4): Use it.
* gnu/packages/java.scm (java-qdox, java-jsr250, java-jsr305)
(java-aopalliance, java-jboss-el-api-spec)
(java-jboss-interceptors-api-spec): Use it.
(java-qdox-M9): Ensure the generated pom file has the correct version.
2021-06-22 13:09:41 +02:00
Paul A. Patience 483f537081
doc, gnu, guix: Fix typos.
* doc/guix.texi: Fix various typos and reword a sentence.
* gnu/packages/cpp.scm (cpplint)[description]: Fix typo.
* gnu/packages/dns.scm (ldns): Fix typo in comment.
* gnu/packages/games.scm (yamagi-quake2): Fix typo in comment.
* gnu/packages/qt.scm (python-pyqtwebengine): Fix typo in comment.
* gnu/packages/rails.scm (ruby-autoprefixer-rails): Fix typo in comment.
* gnu/packages/syndication.scm (quiterss)[description]: Fix typo.
* gnu/packages/terminals.scm (kmscon): Fix typo in comment.
* gnu/packages/xml.scm (perl-xml-sax-base)[description]: Fix typo.
  (python-elementpath)[description]: Fix typo.
* guix/build/asdf-build-system.scm (output-translation): Fix typo in docstring.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-06-13 23:57:45 +02:00
Ludovic Courtès 8cef92d063
profiles: Move some of the work to the build side.
When running:

  guix environment --ad-hoc gnome --no-grafts --search-paths

this reduces wall-clock time by ~5%.  The number of object cache lookups
goes down from 96K to 89K.  (Note that 'gnome' is an interesting example
because it has many propagated inputs, which themselves have propagated
inputs too, which would lead to a long input list and a long manifest in
the 'profile-derivation' gexp.)

* guix/profiles.scm (profile-derivation)[inputs, search-paths]: Remove.
[extra-inputs]: New variable.
[builder]: Adjust call to 'build-profile'.
* guix/build/profiles.scm (manifest-sexp->inputs+search-paths): New
procedure.
(build-profile): Remove 'inputs' parameter; make 'manifest' the 2nd
positional parameter and add #:extra-inputs.  Call
'manifest-sexp->inputs+search-paths' to obtain 'inputs' and
'search-paths'.
2021-06-12 00:49:32 +02:00
Guillaume Le Vaillant 2fa8fd4af5
build-system: asdf: Work around package-name->name+version bug.
This patch modifies how the name of the main Common Lisp system is extracted
from the full Guix package name to work around bug#48225 concerning the
'package-name->name+version' function.

Fixes <https://issues.guix.gnu.org/41437>.

* guix/build-system/asdf.scm (asdf-build): Fix 'systems' function.
* guix/build/asdf-build-system.scm (main-system-name): Fix it.
2021-05-08 13:42:38 +02:00
Timothy Sample 7262619d6f
download: Restore error reporting.
Normal error reporting was disrupted by the introduction of
Disarchive in commit fbc2a52a32.  In
particular, running 'guix download' would succeed with a partially
downloaded file.

* guix/build/download.scm (disarchive-fetch/any): Return '#f' when
Disarchive cannot be found, the specification cannot be found, or
Disarchive fails due to an error.
2021-05-05 23:20:36 -04:00
Leo Prikler 0f116d7f90
build-system: emacs: Clarify %install-dir.
The old comment is no longer adequate, see
<https://lists.gnu.org/archive/html/guix-patches/2021-05/msg00113.html>.

* guix/build/emacs-build-system.scm (%install-dir): Adjust comment to better
reflect usage of this variable.
2021-05-05 10:01:48 +02:00
Leo Prikler 79cfe30f3e
build-system: emacs: Use subdirectories again.
With this, Emacs libraries are installed in the ELPA_NAME-VERSION subdirectory
of site-lisp and potential subdirectories should no longer collide.

* guix/build/emacs-build-system.scm (add-source-to-load-path): Rename to...
(expand-load-path): ... this.  Also expand lone subdirectories of site-lisp.
(%standard-phases): Adjust accordingly.
(elpa-directory): New variable.  Export it publicly for use in other build
systems.
(build, patch-el-files, make-autoloads): Use ELPA name and version to
construct subdirectories of %install-dir.
(install): Install in subdirectory.
2021-05-01 15:56:37 +02:00
Timothy Sample fbc2a52a32
download: Use Disarchive as a last resort.
This is a fixed version of 66b14dccdd,
which was reverted in e74250c3c5.

* guix/download.scm (%disarchive-mirrors): New variable.
(%disarchive-mirror-file): New variable.
(built-in-download): Add 'disarchive-mirrors' keyword argument and
pass its value along to the 'builtin:download' derivation.
(url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'.
* guix/scripts/perform-download.scm (perform-download): Read
Disarchive mirrors from the environment and pass them to
'url-fetch'.
* guix/build/download.scm (disarchive-fetch/any): New procedure.
(url-fetch): Add 'disarchive-mirrors' keyword argument, use it to
make a list of URIs, and use the new procedure to fetch the file if
all other methods fail.
* build-aux/build-self.scm (build-program)[select?]: Exclude '(guix
build download)'.
* guix/self.scm (compiled-guix)[*core-modules*]: Add 'guile-json' to
the list of extensions.
2021-04-29 11:24:48 -04:00