[PATCH] gnu: python@2.7: Honor NIX_STORE.

  • Done
  • quality assurance status badge
Details
3 participants
  • Caleb Ristvedt
  • Sarah Morgensen
  • Ludovic Courtès
Owner
unassigned
Submitted by
Caleb Ristvedt
Severity
normal
C
C
Caleb Ristvedt wrote on 7 Feb 2019 01:07
87sgx0cvgm.fsf_-_@cune.org
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (4 lines)
> Perhaps in the future you could email guix-patches@gnu.org for specific
> commits like this one, especially when it’s not strictly related to the
> daemon?

...

Toggle quote (2 lines)
> Could you send an updated version of the patch?

Here it is!

Toggle quote (5 lines)
> ./configure does not generate any patch files based on patch templates,
> and that’s on purpose. Instead, when we need something like this, we
> handle it the way ld-wrapper.in is handled: by doing the substitution
> when creating the derivation.

"When creating the derivation" sounds like it's when the package is lowered
to a derivation, but from what I can see of ld-wrapper in (gnu packages
base) the actual substitution is done when the derivation is built. I
am curious how one would go about doing the substitution when the
package is lowered to a derivation, though. Anyway, for now I'm doing
the substitution at derivation-build-time.

Toggle quote (3 lines)
> Last, the patch would need to go to ‘core-updates’ because of the number
> of rebuilds it entails.

Should I mention this somewhere?

Also, I should add that "guix lint" and indent-code.el both want changes
to gnu/packages/python.scm, but not due to changes I made. Should a
separate patch address those?

- reepca
S
S
Sarah Morgensen wrote on 26 Sep 2021 04:31
(name . Caleb Ristvedt)(address . caleb.ristvedt@cune.org)
86v92ouky0.fsf@mgsn.dev
Hello,

Caleb Ristvedt <caleb.ristvedt@cune.org> writes:

Toggle quote (57 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Perhaps in the future you could email guix-patches@gnu.org for specific
>> commits like this one, especially when it’s not strictly related to the
>> daemon?
>
> ...
>
>> Could you send an updated version of the patch?
>
> Here it is!
>
>> ./configure does not generate any patch files based on patch templates,
>> and that’s on purpose. Instead, when we need something like this, we
>> handle it the way ld-wrapper.in is handled: by doing the substitution
>> when creating the derivation.
>
> "When creating the derivation" sounds like it's when the package is lowered
> to a derivation, but from what I can see of ld-wrapper in (gnu packages
> base) the actual substitution is done when the derivation is built. I
> am curious how one would go about doing the substitution when the
> package is lowered to a derivation, though. Anyway, for now I'm doing
> the substitution at derivation-build-time.
>
>> Last, the patch would need to go to ‘core-updates’ because of the number
>> of rebuilds it entails.
>
> Should I mention this somewhere?
>
> Also, I should add that "guix lint" and indent-code.el both want changes
> to gnu/packages/python.scm, but not due to changes I made. Should a
> separate patch address those?
>
> - reepca
>
>From 62e9e9a336ab5608405df8114f78c3cbb9dc3a39 Mon Sep 17 00:00:00 2001
>From: Caleb Ristvedt <caleb.ristvedt@cune.org>
>Date: Wed, 30 Jan 2019 17:00:32 -0600
>Subject: [PATCH] gnu: python@2.7: Honor NIX_STORE.
>
>Previously various python packages would fail to work unless the store they
>were kept in was /gnu/store. This fixes that.
>
>* gnu/packages/patches/python-2.7-site-prefixes.patch.in: New file that causes
> python@2.7 to honor NIX_STORE at runtime or, if it isn't set, to use the
> NIX_STORE available when it was built.
>
>* gnu/packages/patches/python-2.7-site-prefixes.patch: Removed.
>
>* gnu/packages/python.scm (python-2.7): generates a patch from
> python-2.7-site-prefixes.patch.in at build-time and applies it.
> (python-3.7): don't apply that patch.
> (python2-minimal): inputs still need to include the patch utility and the
> patch.
>
>* gnu/local.mk: adjust patch name since it's been suffixed with ".in".

Given that Python 2.7 is now EOL and Python 3 doesn't seem to use this
NIX_STORE patch in the first place, is this patch still relevant?

--
Sarah
L
L
Ludovic Courtès wrote on 27 Sep 2021 18:25
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)
874ka6j88d.fsf@gnu.org
Hi Sarah,

Sarah Morgensen <iskarian@mgsn.dev> skribis:

Toggle quote (25 lines)
>>From 62e9e9a336ab5608405df8114f78c3cbb9dc3a39 Mon Sep 17 00:00:00 2001
>>From: Caleb Ristvedt <caleb.ristvedt@cune.org>
>>Date: Wed, 30 Jan 2019 17:00:32 -0600
>>Subject: [PATCH] gnu: python@2.7: Honor NIX_STORE.
>>
>>Previously various python packages would fail to work unless the store they
>>were kept in was /gnu/store. This fixes that.
>>
>>* gnu/packages/patches/python-2.7-site-prefixes.patch.in: New file that causes
>> python@2.7 to honor NIX_STORE at runtime or, if it isn't set, to use the
>> NIX_STORE available when it was built.
>>
>>* gnu/packages/patches/python-2.7-site-prefixes.patch: Removed.
>>
>>* gnu/packages/python.scm (python-2.7): generates a patch from
>> python-2.7-site-prefixes.patch.in at build-time and applies it.
>> (python-3.7): don't apply that patch.
>> (python2-minimal): inputs still need to include the patch utility and the
>> patch.
>>
>>* gnu/local.mk: adjust patch name since it's been suffixed with ".in".
>
> Given that Python 2.7 is now EOL and Python 3 doesn't seem to use this
> NIX_STORE patch in the first place, is this patch still relevant?

Let’s close it and Caleb or anyone is welcome to reopen it if there’s
interest.

Thanks,
Ludo’.
Closed
?