~ruther/guix-local

ref: 81be2eef0dcbfb72d7f01be17ef75a00a8e7d144 guix-local/guix d---------
2d45de1b — Nicolas Graves 8 months ago
build-system/pyproject: Handle wheel not found exception.

The current error is very uninformative, use a proper exception to
give more information when this happens:
`In procedure map: Wrong type argument: #f`

After this patch:
`In procedure raise-exception:
ERROR:
  1. &no-wheels-found`

* guix/build/pyproject-build-system.scm (&no-wheels-found): Add exception.
(install): Handle exception.

Change-Id: Ie72d3b50dfededb2d598162672cdb4321c42b632
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
977caf32 — Nicolas Graves 9 months ago
build-system/pyproject: Avoid PEP427 substitution on binary files.

In some rare cases, the dest-path can be an elf-file, which are
unreadable by substitute*, leading to an error instead of just
continuing which makes more sense in this case.

* guix/build-system/pyproject.scm (check): Guard substitution attempt
with basic readability guarantees.

Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
9a40c514 — Nicolas Graves 9 months ago
build-system/pyproject: Add stestr, unittest and custom options.

* guix/build-system/pyproject.scm (check): Add stestr, unittest and
custom test-backends.

Change-Id: I2d44b3b8dd928ab844b4479fb073afff845e13ee
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
74a1e9d5 — Nicolas Graves 9 months ago
build-system/pyproject: Use copy-recursively instead of merge-dirs.

Using rename-file, the destination had to be empty otherwise it would error
out.  This has been fixed by the use of copy-recursively, really merging them.
Changing this makes merge-directories mostly a duplicate of
copy-recursively, thus fully switch to copy-recursively.

* guix/build/pyproject-build-system.scm (install)
<python-hashbang>: Remove it, used only once.
<merge-directories>: Remove it, replace its calls by copy-recursively
and delete-file-recursively.

Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
e927a071 — Nicolas Graves 1 year, 11 months ago
build-system/pyproject: Add python test-backend.

* guix/build/pyproject-build-system(check): Add python test-backend.

This will help in cases where a simple `python -m module args` call has
to be made instead of fully replacing the 'check phase, e.g. unittest
or django. This is never enabled unless #:test-backend 'python is set,
so it doesn't break anything.

As an example, the following snippet...

(arguments
  (list #:phases #~(modify-phases %standard-phases
                     (replace 'check
                       (lambda* (#:key tests? #:allow-other-keys)
                         (when tests?
                           (invoke "python" "-m" "unittest"
                                   "diff_match_patch.tests")))))))

...can be transformed like this:

(arguments
  '(#:test-backend 'python
    #:test-flags (list "-m" "unittest" "diff_match_patch.tests")))

Change-Id: I4919a3e01d64864e3c328609fbcce7df5b3dfe51
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
7b65bc85 — Maxim Cournoyer 9 months ago
build/pyproject: Fix indentation.

* guix/build/pyproject-build-system.scm: Re-indent file with Emacs.

Change-Id: Ie8a119ce9cf4beccffde93674adb98dc07462ea7
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
f3f42af8 — Maxim Cournoyer 9 months ago
build/pyproject: Resolve import warning.

* guix/build/pyproject-build-system.scm: Hide the 'delete' symbol from
the imported (guix build utils) module to avoid a naming clash warning.

Change-Id: I48f97bf29b5282de1440c68d533c8300d4d11362
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
1d0493e5 — Maxim Cournoyer 1 year, 4 months ago
build/pyproject: Update PEP 427 reference URL in comment.

* guix/build/pyproject-build-system.scm (install): Update reference URL.

Change-Id: Icf5dcc7254c33e8e466773ee66a2fd5648d583da
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
beb63574 — Maxim Cournoyer 1 year, 4 months ago
build/pyproject: Really merge directories in install phase.

Using rename-file, the destination had to be empty otherwise it would
error out.  By using copy-recursively, a directory can be copied onto a
pre-existing directory, really merging them.  This problem manifested
itself attempting to build the python-pyre package.

Solving #596.

* guix/build/pyproject-build-system.scm (install)
<merge-directories>: Use copy-recursively instead of rename-file.

Change-Id: Iceb8609a86f29b17e5fbe6a9629339d0bc26e11f
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
c0ff1be8 — Nicolas Graves 6 months ago
import: utils: Add default-git-error.

* guix/import/utils.scm (default-git-error): Add procedure.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
bd2470ca — Nicolas Graves via Guix-patches via 2 years ago
import: utils: Add function git->origin.

* guix/import/utils.scm: (git-origin, git->origin): Add procedures.

* guix/import/elpa.scm
(download-git-repository): Remove function download-git-repository.
(git-repository->origin): Remove function git-repository->origin.
(ref): Add function ref.
(melpa-recipe->origin): Use functions git->origin and ref.

* guix/import/go.scm
(git-checkout-hash): Remove function git-checkout-hash.
(transform-version): Add function transform-version.
(vcs->origin): Use functions git->origin and transform-version. Add
optional argument transform-version.

* tests/import/go.scm
(go-module->guix-package): Adapt test case to changes in guix/import/go.scm.

* guix/import/luanti.scm
(download-git-repository): Remove function download-git-repository.
(make-luanti-sexp): Use function git->origin.

* tests/luanti.scm
(make-package-sexp): Refresh function accordingly.

* guix/import/composer.scm
(make-php-sexp): Use function git->origin.

Change-Id: Ied05a63bdd60fbafe26fbbb4e115ff6f0bb9db3c
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
68c4eab9 — Nicolas Graves 6 months ago
import: utils: Add API to peek procedure bodies.

* guix/import/utils.scm (peekable-lambda, peek-body): Add procedures.
* .dir-locals.el: Add peekable-lambda indentation.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
7d1d1d1f — Rutherther 6 months ago
guix: update-cached-checkout: Fix fetching remote for branches, commits and tags.

Follow up of 66463356ce5868d3551ea7014acb34543972a5d8.

Because of the mentioned change, update-cached-checkout doesn't
update the checkout for branches, commits or tags.

This means `guix pull` with %default-channels no longer pulls
newer versions. `forward-update-check` no longer fetches the
commit to check relations for, leading to an error that
reference is not available.

* guix/git.scm (update-cached-checkout): Fetch remote even if symref-list is
empty.

Change-Id: Ia6bb1c669065cf19a6dd16c2a403e8590bc07613
d9e2ee3e — Yelninei 6 months ago
packages: Add x86_64-gnu to %cuirass-supported-systems.

* guix/packages.scm (%cuirass-supported-systems): Add x86_64-gnu.

Change-Id: I5aa8bcc511d3e12364a35ce8dac35965e0d9709b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
d12c4452 — Ludovic Courtès 7 months ago
shell, inferior: Store GC roots under /var/guix/profiles.

Fixes guix/guix#2410.

Until now, ‘guix shell’ and ‘guix time-machine’ would store GC roots under
~/.cache/guix.  However, this directory is unreadable to guix-daemon when it’s
running without root privileges.  This commit changes ‘guix shell’ and ‘guix
time-machine’ so they store GC roots under /var/guix/profiles/per-user/$USER,
in a world-readable directory.

An added benefit is that, in cluster setups, user homes no longer need to be
mounted on the head node for GC to work (assuming ‘guix build -r’ and similar
are not used).

* guix/inferior.scm (%inferior-cache-directory): Change default value to be
under ‘%profile-directory’.
(%legacy-inferior-cache-directory): New variable.
(cached-channel-instance): Add ‘maybe-remove-expired-cache-entries’ call.
* guix/scripts/environment.scm (launch-environment/container)[nesting-mappings]:
Add /inferiors and /profiles sub-directories of ‘%profile-directory’.  Call
‘mkdir-p’ for these two directories.
* guix/scripts/shell.scm (%profile-cache-directory): Change default value to
be under ‘%profile-directory’.
(%legacy-cache-directory): New variable.
(guix-shell): Add call to ‘maybe-remove-expired-cache-entries’.

Change-Id: Ie7d6c16a55b35c7beb18078c967d6fc902bf68d0
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
66463356 — Romain GARBAGE 6 months ago
git: Create/update remote references locally when needed.

This allows ‘update-cached-checkout’ to fetch symbolic references such as
those created by the AGit workflow with Forgejo instances.

* guix/git.scm (update-cached-checkout): Create/update remote references
locally.

Change-Id: Ice761d09eebc4f1275381a4eefbdd679d9b95127
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
0a670987 — Romain GARBAGE 7 months ago
inferior: Use channel-reference to get a Git reference.

* guix/inferior.scm (channel-full-commit): Use channel-reference to get a Git reference.

Change-Id: Ia07f8d202ba1df1497d2763d8d49d547c6955ca6
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
b6a73946 — Romain GARBAGE 7 months ago
channels: Export channel-reference.

* guix/channels.scm: Export channel-reference.

Change-Id: I3da7b8d55c0ab563c1669c9e346bb3bd34e7f1db
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
e1cf791d — Ludovic Courtès 6 months ago
Revert "publish: Prevent publication of non-substitutable derivation outputs."

Fixes guix/guix#2450.

This reverts commit b5745a327e8dae21caaf10b59256dc7b16d54588, which introduced
discrepancies in how substitutes are served; in particular, narinfos of
non-substitutable items would still be served, and likewise for narinfos and
nars of dependents of non-substitutable items.
7445776b — Ludovic Courtès 7 months ago
gc: Open a connection to the daemon only when strictly necessary.

Fixes guix/guix#1901.

Previously, ‘guix gc --list-busy’ (which is invoked by ‘guix-daemon’) would
open a connection to the daemon, which in turn attempts to create
/var/guix/profiles/per-user/$USER.  However, when ‘guix-daemon‘ is running as
an unprivileged user, creating that directory fails with EPERM.  Because of
this, garbage collection would always fail when running the unprivileged
daemon on Guix System.

* guix/scripts/gc.scm (guix-gc): Remove upfront call to ‘open-connection’.
Instead, use ‘with-store’ only for operations that require it.

Change-Id: I1fbfd97cf7ba9e3087f7287b4776ea2f6623400d
Next