summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* ui: format 'display-hint' output when no arguments are passed.Antero Mejr2023-03-17
| | | | | | | | | | When display-hint is given format specifiers such as "~%" but no arguments, it does not format the output, causing the specifiers to be visible in the displayed text. * guix/ui.scm (display-hint): Format output when no arguments are passed. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* pack: "fakechroot" engine passes the recursive RUNPATH to ld.so.Ludovic Courtès2023-03-17
| | | | | | | | This is a followup to 58abd5873985e0cd9a2926867bf697c5e7bc01f9, which did not fully address <https://issues.guix.gnu.org/43491>. * guix/scripts/pack.scm (wrapped-package)[build](runpath): Rewrite in terms of 'file-needed/recursive'.
* read-print: 'read-with-comments' reads comments within gexps.Ludovic Courtès2023-03-16
| | | | | | | | Fixes <https://issues.guix.gnu.org/62059>. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/read-print.scm (read-with-comments): Special-case #~, #$, and #+. * tests/read-print.scm: Add two tests.
* guix: Improve download-nar.Christopher Baines2023-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | Previously download-nar worked with gzipped nars and queried berlin.guix.gnu.org (also known as ci.guix.gnu.org). ci.guix.gnu.org no longer serves gzipped nars so this is of limited use. This commit changes download-nar to query both the default substitute servers, and queries for lzipped rather than gzipped nars, since those are available from both. * guix/build/download-nar.scm (urls-for-item): Return urls for lzip rather than gzip compression, and from both default substitute servers. The comment about CDN's is no longer relevant. (restore-gzipped-nar): Rename to restore-lzipped-nar and reimplement accordingly. (download-nar): Add progress reporting and switch to use lzip rather than gzip. * guix/cvs-download.scm (cvs-fetch): Replace guile-zlib with guile-lzlib. * guix/git-download.scm (git-fetch): Replace guile-zlib with guile-lzlib. * guix/hg-download.scm (hg-fetch): Replace guile-zlib with guile-lzlib. * guix/android-repo-download.scm (android-repo-fetch): Add guile-lzlib for download-nar. Signed-off-by: Christopher Baines <mail@cbaines.net>
* guix: Leave some of guix/build/* unchanged.Ludovic Courtès2023-03-13
| | | | | This partially reverts ae587c2ef041413bc709a555261db752068ea360 to reduce the number of rebuilds.
* environment: Clear 'TERM' when checking environment.Winter2023-03-13
| | | | | | | * guix/scripts/environment.scm (child-shell-environment): Set 'TERM' to the empty string. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* guix: Strip #:use-module lists.Ludovic Courtès2023-03-13
| | | | | | | | | | | | This was obtained by setting up this environment: guix shell -D guix --with-input=guile@3.0.9=guile-next \ --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2 -- make -j5 then adding 'unused-module' to (@@ (guix build compiler) %warnings), building, and checking all the "unused module" warnings and removing those that were definitely unused.
* packages: 'package-input-rewriting/spec' ignores hidden packages.Ludovic Courtès2023-03-13
| | | | | | | | | | | | | | | | | | | The primary motivation is to support things like: guix build guix --with-input=guile=guile-next without triggering a rebuild of (@@ (gnu packages commencement) guile-final) and similar things. It is also consistent with package name resolution on the command line: a package that cannot be named cannot be replaced. * guix/packages.scm (package-input-rewriting/spec)[rewrite]: When P is hidden, return it as-is. * tests/packages.scm ("package-input-rewriting/spec, hidden package"): New test. * doc/guix.texi (Defining Package Variants): Update. (Package Transformation Options): Update '--with-input' example.
* packages: Use SRFI-71 instead of SRFI-11.Ludovic Courtès2023-03-13
| | | | * guix/packages.scm (package-input-rewriting/spec): Use SRFI-71 'let'.
* packages: Consider 'patches' by 'package-direct-sources'.Simon Tournier2023-03-13
| | | | | | | * guix/packages.scm (package-direct-sources): Return 'origin' from 'patches'. * tests/packages.scm: Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* lint: Check that python-pre-commit is not an input.Antero Mejr2023-03-12
| | | | | | | | | | pre-commit should never be a native-input of python packages, it's a package manager for commit linting that is irrelevant to builds. * guix/lint.scm (check-inputs-should-not-be-an-input-at-all): Add entry for python-pre-commit. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
* import: Add EUPL 1.1 to the SPDX license name converter.Antero Mejr2023-03-10
| | | | | | * guix/import/utils.scm (spdx-string->license): Add EUPL-1.1 identifier. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* licenses: Add LPL 1.02 (Lucent Public Licence).Antero Mejr2023-03-10
| | | | | | | * guix/licenses.scm (lpl1.02): New variable. * guix/import/utils.scm (spdx-string->license): Add LPL-1.02 identifier. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* build-system/gnu: Remove 'install-license-files' from '%dist-phases'.Ludovic Courtès2023-03-10
| | | | * guix/build/gnu-dist.scm (%dist-phases): Delete 'install-license-files'.
* read-print: Correctly handle comments that follow a list head.Ludovic Courtès2023-03-07
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/61013>. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * guix/read-print.scm (pretty-print-with-comments)[starts-with-line-comment?]: New procedure. Use it when printing a list. * tests/read-print.scm: Add two tests.
* read-print: Special-case channel-related forms.Ludovic Courtès2023-03-07
| | | | | * guix/read-print.scm (%special-forms, %newline-forms): Add channel-related forms.
* gnu: perl-extutils-pkgconfig: Support cross-compilation.Maxim Cournoyer2023-03-06
| | | | | | | | | | | | | | | * guix/search-paths.scm ($PKG_CONFIG_PATH): New variable. * gnu/packages/pkg-config.scm (%pkg-config): Use it. * gnu/packages/perl.scm (perl-extutils-pkgconfig-for-target): New procedure. (perl-extutils-pkgconfig): Turn into a syntax that conditionally expands to... (cross-perl-extutils-pkgconfig): ... this when %current-target-system is set, or... (%perl-extutils-pkgconfig): ... this in a native compilation context. [arguments]: New field. [propagated-inputs]: Turn into... [native-inputs]: ... this. [native-search-paths]: New field.
* scripts: environment: Fix ordering issue with CWD and --expose.Josselin Poiret2023-03-06
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/46782>. * guix/scripts/environment.scm (launch-environment/container): Move the CWD mapping to the front of the file system mappings. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
* build-system/guile: Expose #:scheme-file-regexp when cross-compilingJelle Licht2023-03-06
| | | | | * guix/build-system/guile.scm (guile-cross-build): Accept #:scheme-file-regexp and pass it on to builder.
* git-download: Apply Git attributes on checkouts coming from SWH.Ludovic Courtès2023-03-03
| | | | | | | | | | | | | | | | Fixes a bug whereby CR/LF conversion, for instance, would not be applied on Git repositories retrieved from SWH: https://sympa.inria.fr/sympa/arc/swh-devel/2023-03/msg00000.html Reported by Simon Tournier <simon.tournier@inserm.fr>. Suggested by Valentin Lorentz <valentin.lorentz@inria.fr>. Co-authored by Simon Tournier <simon.tournier@inserm.fr>. * guix/git-download.scm (git-fetch)[build]: Add Git operations conditioned by '.gitattributes' on the result from SWH. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* ui: 'display-hint' quotes extra arguments for Texinfo.Ludovic Courtès2023-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/61201>. Previously, common practice was to splice arbitrary strings (user names, file names, etc.) into Texinfo snippets passed to 'display-hint'. This is unsafe in the general case because at signs and braces need to be escaped to produced valid Texinfo. This commit addresses that. * guix/ui.scm (texinfo-quote): New procedure. (display-hint): When ARGUMENTS is non-empty, pass it to 'texinfo-quote' and call 'format'. (report-unbound-variable-error, check-module-matches-file) (display-collision-resolution-hint, run-guix-command): Remove explicit 'format' call; pass 'format' arguments as extra arguments to 'display-hint'. * gnu/services/monitoring.scm (zabbix-front-end-config): Likewise. * guix/scripts.scm (warn-about-disk-space): Likewise. * guix/scripts/build.scm (%standard-cross-build-options) (%standard-native-build-options): Likewise. * guix/scripts/describe.scm (display-checkout-info): Likewise. * guix/scripts/environment.scm (suggest-command-name): Likewise. * guix/scripts/home.scm (process-command): Likewise. * guix/scripts/home/edit.scm (service-type-not-found): Likewise. * guix/scripts/import.scm (guix-import): Likewise. * guix/scripts/package.scm (display-search-path-hint): Likewise. * guix/scripts/pull.scm (build-and-install): Likewise. * guix/scripts/shell.scm (auto-detect-manifest): Likewise. * guix/scripts/system.scm (check-file-system-availability): Likewise. (guix-system): Likewise. * guix/scripts/system/edit.scm (service-type-not-found): Likewise. * guix/status.scm (print-build-event): Likewise.
* scripts: repl: Extend REPL %load-path with all channels.Simon Tournier2023-02-27
| | | | | | | | | | Fixes <https://bugs.gnu.org/61343>. Reported by 宋文武 <iyzsong@envs.net>. * guix/scripts/repl.scm (define-command): Before starting the REPL, call 'current-profile' to populate (%package-module-path). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gexp: computed-file: Do not honor %guile-for-build.Ludovic Courtès2023-02-27
| | | | | | | | | | | | | | This reverts commit 68775338a510f84e63657ab09242d79e726fa457. Fixes <https://issues.guix.gnu.org/61841>. (%guile-for-build) is a derivation for a specific system, whereas (default-guile) is a system-independent package. It's crucial to preserve this distinction. See discussion at <https://issues.guix.gnu.org/61255#29>. * guix/gexp.scm (computed-file-compiler): Honor (default-guile), not (%guile-for-build).
* pack: Make sure tests can run without a world rebuild.Ludovic Courtès2023-02-27
| | | | | | | | | | | | | | | | | Commit 68380db4c40a2ee1156349a87254fd7b1f1a52d5 moved from 'gexp->derivation', which as a side effect, would lead tests to require a "world rebuild"--specifically, they'd have to build (default-guile). This was mitigated by 68775338a510f84e63657ab09242d79e726fa457, but that change introduced another regression. * guix/scripts/pack.scm (populate-profile-root): Define 'bootstrap?'. Pass #:guile to 'computed-file', with a value depending on 'bootstrap?'. * tests/pack.scm ("self-contained-tarball + localstatedir") ("docker-image + localstatedir", "squashfs-image + localstatedir") ("deb archive with symlinks and control files") ("rpm archive can be installed/uninstalled"): Use a <profile> record instead of a derivation.
* build: haskell-build-system: Build static executables by default.Lars-Dominik Braun2023-02-26
| | | | | | | | | This is the only way to get reasonably small binaries that don’t pull in a ton of ghc-* packages. * guix/build/haskell-build-system.scm (configure): Explicitly add --enable-static and --disable-executable-dynamic, as well as -split-sections to configure flags.
* build-system: haskell: Drop default "static" output.Lars-Dominik Braun2023-02-26
| | | | | | | | | | | | | | | | | | | | * guix/build-system/haskell.scm (lower): Pass outputs to lowered bag. * guix/build/haskell-build-system.scm (install): Remove static library moving code. * gnu/packages/haskell-check.scm (ghc-hunit): Remove "static" output. * gnu/packages/haskell-crypto.scm (ghc-crypto-api-tests): Likewise. * gnu/packages/haskell-xyz.scm (ghc-case-insensitive): Likewise. (ghc-cmdargs): Likewise. (ghc-conduit): Likewise. (ghc-fgl): Likewise. (ghc-haskell-src-exts): Likewise. (ghc-lib-parser): Likewise. (ghc-mono-traversable): Likewise. (ghc-parallel): Likewise. (ghc-paths): Likewise. (ghc-profunctors): Likewise. (ghc-tf-random): Likewise. (ghc-vector): Likewise.
* build: haskell-build-system: Remove unused linker flags.Lars-Dominik Braun2023-02-26
| | | | | | They were inserted as-is, without expandind variables into binaries. * guix/build/haskell-build-system.scm (configure): Remove --ghc-option.
* build: haskell-build-system: Process all transitive dependencies.Lars-Dominik Braun2023-02-26
| | | | | | | | | | | | | | | | | | A bug caused install-transitive-deps to stop looping if a dependency file already existed in the target directory. For Haskell packages with multiple libraries (like attoparsec) this resulted in missing dependencies and error messages like this: The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used. installed package attoparsec-0.14.4 is broken due to missing package scientific-0.3.7.0-9XG3zUjXOw970JFcruv0cZ See <https://issues.guix.gnu.org/54729#11>. * guix/build/haskell-build-system.scm (register): Unconditionally loop over all tails.
* import: haskell: Add new internal library for GHC 9.2.Lars-Dominik Braun2023-02-26
| | | | * guix/import/hackage.scm (ghc-standard-libraries): Add ghc-bignum.
* import: hackage: Use upstream-name property.Lars-Dominik Braun2023-02-26
| | | | | | | * guix/import/hackage.scm (guix-package->hackage-name): Removed. (latest-release): Use package-upstream-name* instead. * guix/import/stackage.scm (latest-lts-release): Ditto. (stackage-lts-package?): Ditto.
* import: hackage: Add upstream-name property.Lars-Dominik Braun2023-02-26
| | | | | | | | | | * guix/import/hackage.scm (hackage-module->sexp): Add property upstream-name to imported package. * tests/hackage.scm (match-ghc-foo): Add upstream-name property. (match-ghc-foo-6): Ditto. (match-ghc-elif): Ditto. (match-ghc-foo-revision): Ditto. (match-ghc-foo-import): Ditto.
* import: stackage: Update to release 20.5.Lars-Dominik Braun2023-02-26
| | | | * guix/import/stackage.scm (%default-lts-version): Update to 20.5.
* build: haskell-build-system: Support multiple libraries.Philip Munksgaard2023-02-26
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/53655>. The patch handles correctly the multiple registration of some package using their own internal sub-libraries. It allows to call 'install-transitive-deps' multiple times and deals with packages requiring a multiple registration. * guix/build/haskell-build-system.scm (register)[install-transitive-deps]: Guard also the destination direction. [install-config-file]: New procedure. Co-Authored-by: zimoun <zimon.toutoune@gmail.com>. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
* build: haskell-build-system: Remove trailing #t.zimoun2023-02-26
| | | | | | | | * guix/build/haskell-build-system.scm (configure, install, setup-compiler, make-ghc-package-database, install-transitive-deps, check, haddock, patch-cabal-file, generate-setuphs): Delete trailing #t. Signed-off-by: Lars-Dominik Braun <lars@6xq.net>
* import: hackage: Allow version at the beginning of cabal file.Lars-Dominik Braun2023-02-26
| | | | | | | | | Fix a corner case, uncovered by the hedgehog package, which has the version field at the beginning of its cabal file. This causes a pattern match failure. * guix/import/hackage.scm (latest-release): Match version at beginning of expression too.
* cpio: Properly handle Unicode characters in file names.Maxim Cournoyer2023-02-25
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/61722>. * guix/cpio.scm (file->cpio-header): Compute the file name length in bytes rather than in characters. (file->cpio-header*, special-file->cpio-header*): Likewise. (write-cpio-archive): Likewise, and write the file name as UTF-8 bytes, not textually, to avoid encoding it as ISO-8859-1.
* offload: Increase initial SSH connection timeout.Maxim Cournoyer2023-02-24
| | | | | | | | | Fixes <https://issues.guix.gnu.org/61646>. * guix/scripts/offload.scm (open-ssh-session): Increase connection timeout from 10 s to 30 s. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* scripts: home: Move ensure-profile-directory to a better place.Andrew Tropin2023-02-24
| | | | | | | | | | | | The profile directory is usually created by daemon, when user opens a connection. Ideally, we would like to remove ensure-profile-directory call at all, but daemon doesn't handle case with custom $GUIX_STATE_DIRECTORY yet. More information in: <https://issues.guix.gnu.org/61717> * guix/scripts/home.scm (process-action): Move ensure-profile-directory call to the place, where connection to the daemon is already open. Reported-by: wolf <wolf@wolfsden.cz>
* git: Make better use of the better progress bar.Tobias Geerinckx-Rice2023-02-19
| | | | | | | | | Commit 189525412e3d803f3f77e15ec4a62aaa57f65a2d introduced ‘high-resolution’ Unicode progress bars, but these require more granular calls to reach their full potential. * guix/git.scm (show-progress): Derive the number of PROGRESS-BAR updates from its maximum resolution, rather than hard-coding 100.
* git: Factor out INDEXER-PROGRESS-TOTAL-OBJECTS access.Tobias Geerinckx-Rice2023-02-19
| | | | * guix/git.scm (show-progress): Reuse the result of the first call.
* ssh: Factor out progress % calculation.Tobias Geerinckx-Rice2023-02-19
| | | | * guix/ssh.scm (notify-transfer-progress): Trust its % argument.
* pack: Add UTF-8 locales to RPM pack builder.Maxim Cournoyer2023-02-23
| | | | | | | | | | | | | It's necessary as 'generate-header' call ends up calling 'find-files', which could fail to read file names containing non-ascii characters, as spotted in the wild: building /gnu/store/...-jami-rpm-pack.rpm.drv... find-files: ./gnu/store/...-nss-certs-3.81/etc/ssl/certs/NetLock_Arany_=Class_Gold=_F??tan??s??tv??ny.pem: No such file or directory * guix/scripts/pack.scm (rpm-archive): Expand set-utf8-locale helper in the builder gexp.
* pack: Register extra /usr/share sub-directories as FHS.Maxim Cournoyer2023-02-22
| | | | | * guix/rpm.scm (%fhs-directories): Add extra FHS directories. They were found to conflict while testing a 'guix pack' built Jami RPM.
* pack: Add RPM format.Maxim Cournoyer2023-02-19
| | | | | | | | | | | | * guix/rpm.scm: New file. * guix/scripts/pack.scm (rpm-archive): New procedure. (%formats): Register it. (show-formats): Add it. (guix-pack): Register supported extra-options for the rpm format. * tests/pack.scm (rpm-for-tests): New variable. ("rpm archive can be installed/uninstalled"): New test. * tests/rpm.scm: New test. * doc/guix.texi (Invoking guix pack): Document it.
* pack: Extract populate-profile-root from self-contained-tarball/builder.Maxim Cournoyer2023-02-19
| | | | | | | | | | | | | | | | | | This allows more code to be reused between the various archive writers. * guix/scripts/pack.scm (set-utf8-locale): New top-level procedure, extracted from... (populate-profile-root): New procedure, extracted from... (self-contained-tarball/builder): ... here. Add #:target argument. Call populate-profile-root. [LOCALSTATEDIR?]: Set db.sqlite file permissions. (self-contained-tarball): Call self-contained-tarball/builder with the TARGET argument, and set #:local-build? to #f for the gexp-derivation call. Remove now extraneous #:target and #:references-graphs arguments from the gexp->derivation call. (debian-archive): Call self-contained-tarball/builder with the #:target argument. Fix indentation. Remove now extraneous #:target and #:references-graphs arguments from the gexp->derivation call.
* gexp: computed-file: Honor %guile-for-build.Maxim Cournoyer2023-02-19
| | | | * guix/gexp.scm (computed-file-compiler): Honor %guile-for-build.
* pack: Use let-keywords instead of keyword-ref.Maxim Cournoyer2023-02-19
| | | | | * guix/scripts/pack.scm: (debian-archive): Bind extra-options keyword arguments via let-keywords.
* guix: Show better progress bars.Julien Lepiller2023-02-19
| | | | | | | | | | | | | Style provides information on the characters to use before and after the progress bar content (`[` and `]` for the ascii style), as well as the character for filled step (`#` for ascii style). When supported, it provides intermediate steps. This is used for unicode style, to show better precision. * guix/progress.scm (<progress-bar-style>): New record type. (ascii-bar-style, unicode-bar-style): New variables. (progress-bar): Draw progress depending on style. When supported, use unicode style. Fall back to ascii style.
* import/cran: Remove directory-needs-zlib? in favor of ↵Ricardo Wurmus2023-02-18
| | | | | | | | needed-libraries-in-directory. * guix/import/cran.scm (directory-needs-zlib?): Remove procedure. (source-dir->dependencies): Use needed-libraries-in-directory instead of directory-needs-zlib?.
* import/cran: Add generic way to detect needed libraries.Ricardo Wurmus2023-02-18
| | | | | * guix/import/cran.scm (needed-libraries-in-directory): New procedure. (libraries-pattern, packages-for-matches): New variables.