summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2021-10-02scripts: home: Wire and document --expression flag.Pierre Langlois
* guix/scripts/home.scm (show-help): Add --expression option. (%options): Likewise. * doc/guix.texi (Invoking guix home): Document it.
2021-10-02import/minetest: Define an updater for mods on ContentDB.Maxime Devos
Only detecting updates is currently supported. To actually perform the uppdates, a patch like <https://issues.guix.gnu.org/50072#4> is required. * guix/import/minetest.scm (version-style,minetest-package?,latest-minetest-release): New procedures. (%minetest-updater): New updater. * tests/minetest.scm (upstream-source->sexp,expected-sexp,example-package): New procedure. (test-release,test-no-release): New macro's. ("same version","new version (dotted)","new version (date)") ("new version (git -> dotted)","dotted->date","date->dotted") ("no commit informaton, no new release") ("minetest is not a minetest mod") ("technic is a minetest mod") ("upstream-name is required"): New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-10-02import: stackage: Use the standard diagnostic procedures.Ludovic Courtès
* guix/import/stackage.scm (leave-with-message): Remove. (stackage-lts-info-fetch): Use 'raise' and 'formatted-message'. (stackage->guix-package): Likewise. (latest-lts-release): Use 'warning' instead of 'format'.
2021-10-02import: stackage: Use 'define-json-mapping'.Ludovic Courtès
* guix/import/stackage.scm (<stackage-lts>, <snapshot>) (<stackage-package>): New record types and JSON mappings. (lts-info-packages, stackage-package-name) (stackage-package-version): Remove. (lts-package-version): Rename 'pkgs-info' to 'packages'; assume 'packages' is a list of <stackage-package>. (stackage->guix-package): Use 'stackage-lts-packages' instead of 'lts-info-packages'. Rename 'packages-info' to 'packages'. (latest-lts-release): Likewise. (stackage-package?): Rename to... (stackage-lts-package?): ... this. Adjust to new API. (%stackage-updater)[pred]: Update accordingly. * tests/lint.scm ("haskell-stackage"): Add "snapshot" entry in JSON snippet.
2021-10-01build-system: linux-module: Don't explicitly return #t from phases.Tobias Geerinckx-Rice
* guix/build-system/linux-module.scm (configure): Remove explicit #t return value.
2021-10-01build-system: linux-module: Build and install in parallel.Tobias Geerinckx-Rice
* 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-09-30import: pypi: Honor the 'upstream-name' package property.Xinglu Chen
Previously, when a PyPI package had a “-” followed by one or more digits in its name, e.g., “AV-98”, the importer would interpret “98” as the version of the package and thus mistake the “AV-98” package for the “av” package on PyPI. $ ./pre-inst-env guix refresh av-98 following redirection to `https://pypi.org/pypi/av/json'... /home/yoctocell/src/guix/gnu/packages/web-browsers.scm:914:13: av-98 would be upgraded from 1.0.1 to 8.0.3 Setting the ‘upstream-name’ property to “AV-98” would solve the problem. $ ./pre-inst-env guix refresh av-98 /home/yoctocell/src/guix/gnu/packages/web-browsers.scm:914:13: 1.0.1 is already the latest version of av-98 * guix/import/pypi.scm (guix-package->pypi-name): Honor ‘upstream-name’ property. (make-pypi-sexp): Set ‘upstream-name’ property when appropriate. * tests/pypi.scm (test-json): Rename to ... (test-json-1): ... this. (test-json-2): New variable ("guix-package->pypi-name, honor 'upstream-name'"): New test. ("pypi->guix-package, package name contains \"-\" followed by digits"): Likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-30discovery: Hide Guile warnings when loading modules.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/43747>. * guix/discovery.scm (scheme-modules): Parameterize 'current-warning-port'.
2021-09-30packages: Factorize and document 'computed-origin-method'.zimoun
The 'computed-origin-method' had been introduced to work around limitations of the 'snippet' mechanism. The procedure was duplicated, which made it hard to automatically detect packages using it. * guix/packages.scm (computed-origin-method): Move procedure from... * gnu/packages/gnuzilla.scm: ...here and... * gnu/packages/gnuzilla.scm: ...there. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-30build-system: linux-module: Normalise the ‘M’ source-directory.Tobias Geerinckx-Rice
"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-28import: minetest: Fix typos.Tobias Geerinckx-Rice
* guix/import/minetest.scm (elaborate-contentdb-name): Fix ‘ambiguous’ and ‘thes’ typos. * tests/minetest.scm: Likewise for all tests.
2021-09-28home-services: Add missing imports and function definition.Andrew Tropin
* gnu/home-services/configuration.scm: Add missing imports. * gnu/home-services/utils.scm (list->human-readable-list): Add new function. * gnu/home-services/configuration.scm: Add missing imports. * gnu/home-services/xdg.scm: Fix ensure-list function. * guix/scripts/home/import.scm: Add missing imports. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
2021-09-27Merge branch 'wip-guix-home'Oleg Pykhalov
2021-09-27import: stackage: Don’t try to update packages not available on Stackage.Xinglu Chen
Previously, the ‘hackage-package?’ predicate was used which meant that the updater would try to update non-Stackage packages, and lead to messages like these: $ guix refresh -t stackage warning: failed to parse https://hackage.haskell.org/package/hurl/hurl.cabal warning: failed to parse https://hackage.haskell.org/package/idris/idris.cabal Since ‘hurl’ and ‘idris’ aren’t available on the current Stackage LTS release, they should be filtered out before the Stackage updater even tries to update them. * stackage.scm (stackage-package?): New procedure. (%stackage-updater): Use it. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
2021-09-25Update copyright assignments for Liliana Marie Prikler.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-23syscalls: Deduplicate device number conversion.Tobias Geerinckx-Rice
* 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-22download: Fall back to web.archive.org as a very last resort.Ludovic Courtès
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-21graph: Add '--max-depth'.Ludovic Courtès
* guix/graph.scm (export-graph): Add #:max-depth and honor it, adding 'depths' argument to 'loop'. * guix/scripts/graph.scm (%options, show-help): Add '--max-depth'. (%default-options): Add 'max-depth'. (guix-graph): Pass #:max-depth to 'export-graph'. * tests/graph.scm ("package DAG, limited depth"): New test. * doc/guix.texi (Invoking guix graph): Document it.
2021-09-21base32: Work around (ash x N) miscompilation at '-O1' and below.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/50696>. Reported by Marius Bakke <marius@gnu.org>. * guix/base32.scm (bit-field): Introduce 'minus-start' syntax and use it.
2021-09-18git: 'reference-available?' recognizes 'tag-or-commit'.Ludovic Courtès
* guix/git.scm (reference-available?): Handle 'tag-or-commit' with a 40-digit hex string.
2021-09-18git: 'update-cached-checkout' can fall back to SWH when cloning.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/44187>. Reported by zimoun <zimon.toutoune@gmail.com>. * guix/git.scm (GITERR_HTTP): New variable. (clone-from-swh, clone/swh-fallback): New procedures. (update-cached-checkout): Use 'clone/swh-fallback' instead of 'clone*'.
2021-09-18swh: Support downloads of bare Git repositories.Ludovic Courtès
* guix/swh.scm (swh-download-archive): New procedure. (swh-download-directory): Rewrite in terms of 'swh-download-archive'. (swh-download): Add #:archive-type and honor it. Use 'swh-download-archive' instead of 'swh-download-directory'.
2021-09-18import: go: Match "go-import" meta tags anywhere.Sarah Morgensen
Some personal sites forget to put <meta name="go-import" ...> in a <head> element, so look anywhere for them. Partly fixes <https://issues.guix.gnu.org/50595>. Reported by Stephen Paul Weber <singpolyma@singpolyma.net>. * guix/import/go.scm (fetch-module-meta-data): Match "go-import" meta tags anywhere in the page. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-18import: go: Improve handling of modules in VCS subdirectories.Sarah Morgensen
Use the supplied module path (instead of the repository root) as the import path for everything except source and homepage URLs. For modules not in the root of a VCS repository, set #:unpack-path to the repository root by default. Partly fixes <https://issues.guix.gnu.org/50595>. Reported by Stephen Paul Weber <singpolyma@singpolyma.net>. * guix/import/go.scm (go-module->guix-package): Use 'module-path' instead of 'root-module-path' for #:import-path. Emit #:unpack-path when #:import-path is not equal to 'root-module-path'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-18import: minetest: Strip "v" prefixes from the version number.Maxime Devos
This fixes one of the issues noted at <https://issues.guix.gnu.org/50425#4>. * guix/import/minetest.scm (release-version): New procedure. (%minetest->guix-package): Call new procedure instead of release-title. * tests/minetest.scm (make-package-sexp): Allow overriding the version number. (make-releases-json): Allow overriding the release title. ("conventional version number") ("v-prefixed version number") ("dates as version number"): New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-18import: minetest: Delete duplicate dependencies.Maxime Devos
This fixes one of the issues noted in <https://issues.guix.gnu.org/50425#4>. * guix/import/minetest.scm (import-dependencies): Call 'delete-duplicates' on the resulting list. * tests/minetest.scm ("minetest->guix-package, multiple dependencies implemented by one mod"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-18channels: 'channel-news-entry-commit' correctly resolves annotated tags.Ludovic Courtès
Previously, 'channel-news-entry-commit' would return the tag ID rather than the commit ID when the news entry was referred to via an annotated tag. Reported by Xinglu Chen <public@yoctocell.xyz>. * guix/channels.scm (resolve-channel-news-entry-tag): Check whether the reference points to annotated tag; resolve it if it does. * tests/channels.scm ("channel-news, annotated tag"): New test.
2021-09-18import: Add 'generic-git' updater.Xinglu Chen
* guix/git.scm (ls-remote-refs): New procedure. * tests/git.scm ("remote-refs" "remote-refs: only tags"): New tests. * guix/import/git.scm: New file. * doc/guix.texi (Invoking guix refresh): Document it. * tests/import-git.scm: New test file. * Makefile.am (MODULES, SCM_TESTS): Register the new files. Co-authored-by: Sarah Morgensen <iskarian@mgsn.dev> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-18tests: git: Make 'tag' directive non-interactive.Xinglu Chen
When running 'git tag TAGNAME', Git will open up the user's default text editor to make them write a message. This is not desirable when running tests. * guix/tests/git.scm (populate-git-repository): Add a 'tag' directive that takes an additional argument, and pass it to the '-m' flag. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2021-09-18tests: git: Don't read from the users global Git config file.Xinglu Chen
* guix/tests/git (populate-git-repository): Set the GIT_CONFIG_GLOBAL environment variable to the temporary Git config file. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-15store: 'map/accumulate-builds' processes the whole list in case of cutoff.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/50264>. Reported by Lars-Dominik Braun <lars@6xq.net>. This fixes a regression introduced in fa81971cbae85b39183ccf8f51e8d96ac88fb4ac whereby 'map/accumulate-builds' would return REST (the tail of LST) without applying PROC on it. The effect would be that 'lower-inputs' in (guix gexp) would dismiss those elements, leading to derivations with correct builders but only a subset of the inputs they should have had. * guix/store.scm (map/accumulate-builds): Add #:cutoff parameter and remove 'accumulation-cutoff' variable. Call PROC on the elements of REST. * tests/store.scm ("map/accumulate-builds cutoff"): New test.
2021-09-15import: cabal: Treat identifier names correctly.Xinglu Chen
* guix/import/cabal.scm (is-id): Accept the location as an argument. Don’t check if the identifier name is a reserved keyword unless it is the first word on the line. (lex-word): Adjust accordingly. * tests/hackage ("hackage->guix-package tests flag executable"): Expect it to pass. Fixes: <https://issues.guix.gnu.org/25138> Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
2021-09-14build-system: linux-module: Support source-directory.Liliana Marie Prikler
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-14scripts: import: Increase column width for pretty-printer.Xinglu Chen
Previously, the max column width for the pretty-printer was 50, which caused generated package definitions to include unnecessary newlines, e.g., (home-page "https://gitlab.com/ttyperacer/terminal-typeracer") instead of (home-page "https://gitlab.com/ttyperacer/terminal-typeracer") * guix/scripts/import.scm (guix-import): Set max expression width to 80 when pretty-printing. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-14download: Disarchive mirrors can be URL-returning procedures.Ludovic Courtès
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-14download: Remove obsolete workaround.Ludovic Courtès
* guix/download.scm (%content-addressed-mirrors): Use (guix base16) unconditionally.
2021-09-13guix: self: Add *home-modules*.Andrew Tropin
* guix/self.scm(*home-modules*): New variable. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
2021-09-13build/go: Support cross compiling.Efraim Flashner
* 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-13packages: Add 'package-definition-location'.Ludovic Courtès
Suggested by Maxime Devos <maximedevos@telenet.be>. * guix/packages.scm (current-definition-location): New syntax parameter. (define-public*): New macro. (<package>)[definition-location]: New field. (package-definition-location): New procedure. * tests/packages.scm ("package-definition-location"): New test.
2021-09-13packages: Store 'location' field as a literal vector.Ludovic Courtès
This is slightly more efficient than storing an alist in terms of .go file size (< 1% smaller) and load time. * guix/packages.scm (current-location-vector): New macro. (sanitize-location): New procedure. (<package>)[location]: Change 'default' and add 'sanitize'. (package-location): New procedure.
2021-09-10import: elpa: Don't hardcode default branch to 'master'.Xinglu Chen
Otherwise, remotes without a branch named 'master' will cause an error when importing. * guix/import/elpa (git-repository->origin): Fallback to HEAD instead of the 'master' branch. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-10swh: 'swh-download' reports revision lookup failures.Ludovic Courtès
* guix/swh.scm (swh-download): Log lookup failures.
2021-09-10swh: Adjust to new vault API.Ludovic Courtès
Previously the path to query the vault or request cooking of a directory was /api/1/vault/directory/ID. It is now deprecated in favor if /api/1/vault/flat/SWHID. This commit adjusts code accordingly and also prepares for 'git-bare' support. * guix/swh.scm (vault-url): New procedure. (query-vault, request-cooking): Make 'kind' optional, and add #:archive-type. Use 'vault-url'. (vault-fetch): Make 'kind' optional and add #:archive-type. Adjust 'query-vault' and 'request-cooking' calls accordingly.
2021-09-10lint: archival: Warn about non-origin sources.Ludovic Courtès
* guix/lint.scm (check-archival): Warn about non-origin sources.
2021-09-10base32: Provide an open-coded 'bit-field'.Ludovic Courtès
This improves the throughput of 'bytevector->base32-string' a bit. * guix/base32.scm (bit-field): New macro.
2021-09-10base16: Reduce GC pressure in bytevector->base16-string.Maxime Devos
This makes bytevector->base16-string two times faster. * guix/base16.scm (bytevector->base16-string): Use utf8->string and iteration instead of string-concatenate and named let. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-09-09scripts: home: Add import subcommand.Andrew Tropin
* guix/scripts/home/import.scm: New file. * Makefile.am (MODULES): Add it. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
2021-09-09scripts: Add 'guix home'.Andrew Tropin
* guix/scripts/home.scm: New file. * Makefile.am (MODULES): Add it. Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
2021-09-09swh: Adjust <vault-reply> to latest API changes.Ludovic Courtès
Fixes uses of 'swh-download' as reported at <https://lists.gnu.org/archive/html/guix-devel/2021-09/msg00115.html>. Reported by zimoun. * guix/swh.scm (<vault-reply>)[object-id, object-type]: Remove. These two fields are no longer provided in JSON replies. [swhid]: New field.
2021-09-08transformations: Git tags and 'git describe' style IDs are used as version.Marius Bakke
* guix/transformations.scm (commit->version-string): New procedure. Use git tags and 'git describe' style identifiers directly. (transform-package-source-commit): Adjust accordingly. * tests/transformations.scm ("options->transformation, with-commit, version transformation"): New test. * doc/guix.texi (Package Transformation Options): Mention the 'git describe' style.