summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2021-07-11packages: Add 'lookup-package-input' & co.Ludovic Courtès
* 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.
2021-07-11lint: Add 'input-labels' checker.Ludovic Courtès
* 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.
2021-07-11packages: Allow inputs to be plain package lists.Ludovic Courtès
* 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.
2021-07-11records: Support field sanitizers.Ludovic Courtès
* 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.
2021-07-08utils: Add 'search-input-directory'.Ludovic Courtès
* guix/build/utils.scm (search-input-directory): New procedure. * doc/guix.texi (Build Utilities): Document it next to 'search-input-file'. Tweak wording.
2021-07-08build-system/gnu: patch-shebangs: Also patch shebangs in "/libexec".Maxime Devos
Shebangs in "/bin" and "/sbin" subdirectories are currently patched by patch-shebangs. But shebangs in "/libexec" currently aren't, even though they occasionally need to be. E.g. when using wrap-program on an executable in "libexec" without an explicit #:sh when cross-compiling. * guix/build/gnu-build-system.scm (patch-shebangs): Add "/libexec" to 'bin-directories'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-07-05build-system/trivial: Honor build inputs when cross-compiling.Ludovic Courtès
Fixes a regression introduced in 7d873f194ca69d6096d28d7a224ab78e83e34fe1 whereby host inputs would be missing altogether from '%build-inputs', which broke cross-compilation. * guix/build-system/trivial.scm (trivial-cross-build): Append HOST-INPUTS to the 'with-build-variables' argument.
2021-07-05tests: Unset NIX_STORE_DIR when running external tests.Ludovic Courtès
This is a followup to cfcead2e515c0dae02127e5a76496463898be6b6 and 47a6a938c3c4d0bbe7b6a3c64ff75d7bfb2f24fb, which made (guix packages) dependent on the value of NIX_STORE_DIR. * guix/tests.scm (call-with-external-store): Unset NIX_STORE_DIR before calling PROC.
2021-07-05build-system/gnu: Define '%build-inputs' when cross-compiling.Ludovic Courtès
Reported by Maxime Devos. * guix/build-system/gnu.scm (gnu-cross-build)[builder]: Define '%build-inputs' as it existed before 7d873f194ca69d6096d28d7a224ab78e83e34fe1.
2021-07-05build-system/texlive: Change default format to pdftexThiago Jung Bauermann
LuaTeX has a bug where sometimes it corrupts the heap and aborts. This causes the build of texlive packages to fail at random. The problem is being tracked at https://issues.guix.gnu.org/48064. While a fix isn't found, switch the default TeX format (and consequently also the engine) to pdftex to avoid the issue. * guix/build-system/texlive.scm (texlive-build): Change default value of the ‘tex-format’ key parameter to “pdftex”. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-07-01packages: 'package-derivation' honors 'system' again.Ludovic Courtès
Fixes a regression introduced in 7d873f194ca69d6096d28d7a224ab78e83e34fe1. Starting from 7d873f194ca69d6096d28d7a224ab78e83e34fe1, running guix build -s aarch64-linux sed on an x86_64-linux machine would return an x86_64-linux machine, whereby only the top derivation of the graph would be aarch64-linux while all its dependencies would be x86_64-linux. * guix/packages.scm (expand-input): Add 'system' parameter and honor it. (bag->derivation, bag->cross-derivation): Pass SYSTEM to 'expand-input'. * tests/packages.scm ("package-derivation, different system"): New test.
2021-06-23Merge branch 'master' into core-updatesTobias Geerinckx-Rice
Conflicts: gnu/packages/cups.scm gnu/packages/python-web.scm gnu/packages/web.scm guix/build/maven/pom.scm
2021-06-22tests: Remove stale reference to %derivation-cache.Chris Marusich
* guix/tests.scm (call-with-external-store): Remove the stale reference to %derivation-cache. This was causing the tests to error out, since it was removed from (guix packages) in 7d873f194ca69d6096d28d7a224ab78e83e34fe1.
2021-06-22profiles: Build union of inputs in the right order.Ludovic Courtès
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 8cef92d0633850d97c1a1d4521812268f56672be, 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-22guix: java-utils: Look for actual jar files.Julien Lepiller
* guix/build/java-utils.scm (install-from-pom): Fix `find-files` to look only for jar files.
2021-06-22guix: maven: Use a temporary file to fix pom files.Julien Lepiller
* guix/build/maven/pom.scm (fix-pom-dependencies): Actually use the temporary file that was created.
2021-06-22guix: maven: Look in local packages when searching for package version.Julien Lepiller
* guix/build/maven/pom.scm (fix-pom-dependencies): Also look at local packages when looking for a package version.
2021-06-22guix: maven: Support fixing modules.Julien Lepiller
* 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-22guix: maven: Support fixing extensions.Julien Lepiller
* guix/build/maven/pom.scm (fix-pom-dependencies): Add support for fixing extension versions.
2021-06-22guix: maven: Simplify finding local packages and modules.Julien Lepiller
* 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-22guix: maven: Simplify finding version and group information.Julien Lepiller
* 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-22guix: java-utils: Factorize pom.xml generation.Julien Lepiller
* 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-21import: egg: Edit egg->guix-package docstring.Tobias Geerinckx-Rice
* guix/import/egg.scm (egg->guix-package): Edit docstring.
2021-06-19import: launchpad: Fix typo.Brice Waegeneire
* guix/import/launchpad.scm (latest-release): Rename 'origin-github-uri' to 'origin-launchpad-uri'.
2021-06-19import: launchpad: Use repository to retrieve releases.Matthew James Kraai
* guix/import/launchpad.scm (latest-released-version): Use repository instead of package name. (latest-release): Pass repository to latest-released-version. Signed-off-by: Brice Waegeneire <brice@waegenei.re>
2021-06-19Merge branch 'master' into core-updatesMarius Bakke
Note: this merge actually changes the 'curl' and 'python-attrs' derivations, as part of solving caf4a7a2770ef4d05a6e18f40d602e51da749ddc and 12964df69a99de6190422c752fef65ef813f3b6b respectively. 4604d43c0e (gnu: gnutls@3.6.16: Fix cross-compilation.) was ignored because it cannot currently be tested. Conflicts: gnu/local.mk gnu/packages/aidc.scm gnu/packages/boost.scm gnu/packages/curl.scm gnu/packages/nettle.scm gnu/packages/networking.scm gnu/packages/python-xyz.scm gnu/packages/tls.scm
2021-06-19build-system/haskell: Import build variables.Marius Bakke
* guix/build-system/haskell.scm (haskell-build): Wrap in WITH-BUILD-VARIABLES in order to get %build-inputs and friends.
2021-06-19build-system/node: Add missing module import.Marius Bakke
This accidentally disappeared in fcc39864dba82e14895afbe841091091366c96bc. * guix/build-system/node.scm: Import (guix store).
2021-06-18profiles: Add "XAUTHORITY" to the precious variables.Ludovic Courtès
Suggested by Maxime Devos <maximedevos@telenet.be>. * guix/profiles.scm (%precious-variables): Add "XAUTHORITY".
2021-06-18profiles: Add 'load-profile'.Ludovic Courtès
* guix/profiles.scm (%precious-variables): New variable. (purify-environment, load-profile): New procedures. * guix/scripts/environment.scm (%precious-variables) (purify-environment, create-environment): Remove. (launch-environment): Call 'load-profile' instead of 'create-environment'. * tests/profiles.scm ("load-profile"): New test.
2021-06-18lint: check-patch-headers: Recognize Git diffs.Ludovic Courtès
* guix/lint.scm (check-patch-headers): Add "diff --git " prefix.
2021-06-18import: launchpad: Gracefully handle 404s from api.launchpad.net.Ludovic Courtès
Fixes <https://bugs.gnu.org/49031>. Reported by Emad Alblueshi <emad.albloushi@gmail.com>. * guix/import/launchpad.scm (latest-released-version): Gracefully handle 'json-fetch' returning #f.
2021-06-18Start enabling substitutes from bordeaux.guix.gnu.org.Christopher Baines
In addition to substitutes from ci.guix.gnu.org. There are more changes that can be made in the future, but these changes seem like a good start. * config-daemon.ac (guix_substitute_urls): Add https://bordeaux.guix.gnu.org. * guix/scripts/substitute.scm (%default-substitute-urls): Add http://bordeaux.guix.gnu.org. * guix/store.scm (%default-substitute-urls): Add bordeaux.guix.gnu.org. * doc/guix.texi: Adjust accordingly. * doc/contributing.texi: Adjust accordingly.
2021-06-16pack: Fix the system value passed to build-docker-image.Maxim Cournoyer
Before this change, the system value would be passed as x86_64 when using a i686-linux emulated system, e.g.: $ guix environment --system=i686-linux --ad-hoc guile -- \ guile -c '(display (utsname:machine (uname))) (newline)' x86_64 This change uses the Guile builtin %host-type variable, which doesn't have this problem: $ guix environment --system=i686-linux --ad-hoc guile -- \ guile -c '(display %host-type) (newline)' i686-unknown-linux-gnu * guix/scripts/pack.scm (docker-image)[#:system] Use %host-type as a fall-back when target is not defined. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2021-06-14hg-download: Make (guix swh) output visible.Ludovic Courtès
* guix/hg-download.scm (hg-fetch)[build]: Add 'setvbuf' calls.
2021-06-14hg-download: Support falling back to SWH.Xinglu Chen
* guix/hg-download.scm (hg-fetch): Fall back to fetching the source from SWH if the upstream source is missing. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-06-14swh: Support lookup of Hg tags.Xinglu Chen
* guix/swh.scm (lookup-origin-revision): Support lookup of Hg tags, not just Git tags. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-06-14hg-download: Remove bogus hg-reference-recursive? export.itd
* guix/hg-download.scm: Do not export undefined hg-reference-recursive?. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2021-06-13guix package: Do not say "nothing to do" upon rollback & co.Ludovic Courtès
Previously, "guix package --switch-generations=4" or similar would print "nothing to do". * guix/scripts/package.scm (process-actions): Do not warn about "nothing to do" when one of %ACTIONS is requested.
2021-06-13doc, gnu, guix: Fix typos.Paul A. Patience
* 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-13describe: 'current-channel-entries' ignores non-channel profile entries.Ludovic Courtès
Fixes <https://bugs.gnu.org/48778>. A side effect of c47f3fc13562d82edfd2d47342574154c452843a is that (@ (guix describe) current-profile) provides the correct answer when the 'guix' package is installed in a profile. Consequently, the 'guix' package installed in /run/current-system/profile (for instance) would end up loading all the .scm files in that directory. * guix/describe.scm (current-channel-entries): Remove ENTRY if it lacks the 'source' property.
2021-06-12profiles: Move some of the work to the build side.Ludovic Courtès
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-12git: Update the mtime of the just-updated checkout.Ludovic Courtès
Reported by zimoun <zimon.toutoune@gmail.com>. Previously, the mtime of CACHE-DIRECTORY may or may not have been updated after a pull. Thus, 'maybe-remove-expired-cache-entries' could potentially delete CACHE-DIRECTORY right before it's returned. * guix/git.scm (update-cached-checkout): Call 'utime' on CACHE-DIRECTORY.
2021-06-08lint: Check for trailing whitespace in description.Xinglu Chen
* guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-06-08lint: Check for trailing whitespace in synopsis.Xinglu Chen
* guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-06-08transformations: '--with-latest' correctly handles already-latest case.Ludovic Courtès
Previously, '--with-latest' would wrongfully print: warning: could not determine latest upstream release of 'xyz' when 'xyz' is already the latest version. This fixes that. * guix/transformations.scm (transform-package-latest): Use 'package-latest-release' instead of 'package-latest-release*'.
2021-06-08grafts: Cache the derivation/graft mapping for the whole session.Ludovic Courtès
Partly fixes <https://bugs.gnu.org/41702>. Reported by Lars-Dominik Braun <ldb@leibniz-psychology.org>. Previously, 'graft-derivation' would start anew at every call. When creating a profile with lots of packages, it would potentially do the same work multiple times. The per-session cache addresses this. It increases the derivation-graft-cache hit rate from 77.9% to 80.1% on: GUIX_PROFILING="derivation-graft-cache" ./pre-inst-env \ guix environment --ad-hoc libreoffice inkscape krita darktable -n The effect is more visible on the pathological case below, where cache hit rate goes from 75% to 87% and wall-clock time from 5.0s to 3.5s: GUIX_PROFILING="derivation-graft-cache" ./pre-inst-env \ guix environment --ad-hoc r-learnr --search-paths * guix/grafts.scm (%graft-cache): New variable. (graft-derivation): Add calls to 'store-connection-cache' and 'set-store-connection-cache!'.
2021-06-08store: 'references/cached' now uses a per-session cache.Ludovic Courtès
* guix/store.scm (%reference-cache): Remove. (%reference-cache-id): New variable. (references/cached): Rewrite in terms of it.
2021-06-08store: Remove 'references/substitutes'.Ludovic Courtès
This procedure lost its only user in commit 710854304b1ab29332edcb76f3de532e0724c197. * guix/store.scm (references/substitutes): Remove. * tests/store.scm ("references/substitutes missing reference info") ("references/substitutes with substitute info"): Remove.
2021-06-08grafts: Use SRFI-71 instead of SRFI-11.Ludovic Courtès
* guix/grafts.scm (reference-origins): Use SRFI-71 'let*'.