Commit Graph

11659 Commits

Author SHA1 Message Date
Colin Putney
96118850f3 Unwrap python scripts when building an environment
When building a python environment's bin directory, we now detect
wrapped python scripts from installed packages, and generate unwrapped
copies with the environment's python executable as the interpreter.
2024-03-21 19:27:06 -06:00
Colin Putney
234bb31f61 Fix venv creation in Python environments
The way we build python environments is subtly broken. A python
environment should be semantically identical to a vanilla Python
installation in, say, /usr/local. The current implementation, however,
differs in two important ways. The first is that it's impossible to use
python packages from the environment in python virtual environments. The
second is that the nix-generated environment appears to be a venv, but
it's not.

This commit changes the way python environments are built:

  * When generating wrappers for python executables, we inherit argv[0]
    from the wrapper. This causes python to initialize its configuration
    in the environment with all the correct paths.
  * We remove the sitecustomize.py file from the base python package.
    This file was used tweak the python configuration after it was
    incorrectly initialized. That's no longer necessary.

The end result is that python environments no longer appear to be venvs,
and behave more like a vanilla python installation. In addition it's
possible to create a venv using an environment and use packages from
both the environment and the venv.
2024-03-21 19:26:57 -06:00
github-actions[bot]
d28bcc2044 Merge staging-next into staging 2024-03-21 18:01:42 +00:00
Nick Cao
c94c774e4d Merge pull request #297562 from r-ryantm/auto-update/expr
expr: 1.16.1 -> 1.16.2
2024-03-21 08:34:01 -04:00
R. Ryantm
4a1c0b92d8 risor: 1.3.2 -> 1.5.1 2024-03-21 08:01:07 +00:00
R. Ryantm
f83aedc6bf expr: 1.16.1 -> 1.16.2 2024-03-20 23:10:58 +00:00
github-actions[bot]
7f8db6f00d Merge staging-next into staging 2024-03-20 18:01:38 +00:00
github-actions[bot]
36232fff71 Merge master into staging-next 2024-03-20 18:01:02 +00:00
Olivia Crain
b51c572c62 python39.doc: fix build with sphinx >= 5.3.0
Backport upstream fix for cpython issue 98366 from 3.10 tree
2024-03-20 10:28:16 -05:00
R. Ryantm
72016cd6de wasmer: 4.2.6 -> 4.2.7 2024-03-20 01:40:38 +00:00
github-actions[bot]
66eeab8faf Merge staging-next into staging 2024-03-19 06:01:43 +00:00
Martin Weinelt
3321e63b12 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/sphinx-autobuild/default.nix
2024-03-19 04:00:32 +01:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00
github-actions[bot]
83409a8a66 Merge staging-next into staging 2024-03-17 12:02:22 +00:00
Sandro
24fd994fc4 Merge pull request #295562 from SuperSandro2000/python27
python27: 2.7.18.7 -> 2.7.18.8
2024-03-17 08:53:14 +01:00
annalee
8ead81a60f Merge remote-tracking branch 'upstream/master' into staging-next 2024-03-17 07:18:11 +00:00
Mario Rodas
5e8f55005f Merge pull request #296328 from r-ryantm/auto-update/wazero
wazero: 1.6.0 -> 1.7.0
2024-03-16 22:40:24 -05:00
Mario Rodas
ddd3d0d016 Merge pull request #293554 from r-ryantm/auto-update/yaegi
yaegi: 0.15.1 -> 0.16.0
2024-03-16 22:37:32 -05:00
Martin Weinelt
b54e2bc7fd Merge pull request #296117 from SuperSandro2000/python-relax-deps-hook-no-pname
pythonRelaxDepsHook: don't rely on pname as that could be normalized already
2024-03-17 03:07:48 +01:00
github-actions[bot]
b74fe245b8 Merge staging-next into staging 2024-03-17 00:02:45 +00:00
github-actions[bot]
2178d8d857 Merge master into staging-next 2024-03-17 00:02:17 +00:00
Pol Dellaiera
ac97c071c9 php82: 8.2.16 -> 8.2.17
Diff: https://github.com/php/php-src/compare/php-8.2.16..php-8.2.17
Changelog: https://github.com/php/php-src/blob/PHP-8.2.17/NEWS
2024-03-16 19:53:24 +01:00
Matthieu Coudron
0c9417100f lua: update setup-hook to limit LUA_PATH size
now that the lua interpreters include working directories with `./?.lua`
in LUA_PATH, the current test includes every derivation which quickly
becomes unreadable and unpractical.
The test is adapted to add a folder only if it can find lua files in the
subfolder.
2024-03-16 14:37:10 +01:00
Matthieu Coudron
815d3683f7 lua.tests: update golden values for default LUA_PATH
when LUA_PATH contains `;;`, it is replaced by `;LUA_PATH_DEFAULT;` in
lua 5.1:
Updated 69ea087dff/loadlib.c (L599)
More recent versions might be smarter ?
65b07dd53d/loadlib.c (L301)
2024-03-16 14:37:10 +01:00
Matthieu Coudron
640cdcb814 lua: smarter/more correct patching
In order to have the 'reset' LUA_PATH (aka `;;`) work, and for purity
reasons(removing /usr paths) we(I) decided to patch the lua interpreters default LUA_PATH.
Turns out the interpreters have different defaults and the patch was too
coarse.
There is smarter patching that can be done via LUA_ROOT.

Also luajit doesn't need patching at all since LUA_ROOT is set via the
build system.
2024-03-16 14:37:09 +01:00
github-actions[bot]
5fb2bcd3dd Merge master into staging-next 2024-03-16 06:00:56 +00:00
R. Ryantm
918384cd72 wazero: 1.6.0 -> 1.7.0 2024-03-16 02:50:21 +00:00
Sandro Jäckel
61baca011c python27: 2.7.18.7 -> 2.7.18.8
Diff: https://github.com/ActiveState/cpython/compare/v2.7.18.7...v2.7.18.8
2024-03-15 13:13:12 +01:00
github-actions[bot]
9da92f31f4 Merge master into staging-next 2024-03-15 12:01:07 +00:00
Sandro Jäckel
be51056b85 pythonRelaxDepsHook: don't rely on pname as that could be normalized already
according to the language docs
2024-03-15 11:27:27 +01:00
Thiago Kenji Okada
f6db97dc33 Merge pull request #294339 from cap10morgan/update-clojure
clojure: 1.11.1.1435 -> 1.11.2.1446
2024-03-15 10:04:03 +00:00
github-actions[bot]
4aac48ff7f Merge master into staging-next 2024-03-15 06:01:09 +00:00
Mario Rodas
f22c47bc2a luau: 0.616 -> 0.617
Diff: https://github.com/luau-lang/luau/compare/0.616...0.617

Changelog: https://github.com/luau-lang/luau/releases/tag/0.617
2024-03-15 04:20:00 +00:00
Pol Dellaiera
f242fc768b Merge pull request #296020 from r-ryantm/auto-update/php83
php83: 8.3.3 -> 8.3.4
2024-03-15 03:36:27 +01:00
github-actions[bot]
2bffd64e73 Merge master into staging-next 2024-03-15 00:01:59 +00:00
R. Ryantm
46b22f0f9a php83: 8.3.3 -> 8.3.4 2024-03-14 23:59:34 +00:00
Pol Dellaiera
81c42da3c3 php: use --replace-fail 2024-03-14 12:02:39 +01:00
github-actions[bot]
cc92370007 Merge master into staging-next 2024-03-14 00:02:16 +00:00
Nick Cao
a25df44563 Merge pull request #295570 from r-ryantm/auto-update/wasmtime
wasmtime: 18.0.2 -> 18.0.3
2024-03-13 18:23:56 -04:00
R. Ryantm
c0dc4cbc1b erlang: 25.3.2.9 -> 25.3.2.10 2024-03-13 17:52:36 +00:00
natsukium
8837f2fef2 python313: add a flag to disable GIL 2024-03-13 23:32:38 +09:00
Martin Weinelt
b89f66b768 python313: 3.13.0a3 -> 3.13.0a5
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-4
https://docs.python.org/3.13/whatsnew/changelog.html#python-3-13-0-alpha-5
2024-03-13 14:43:51 +01:00
R. Ryantm
590562d97b wasmtime: 18.0.2 -> 18.0.3 2024-03-13 10:03:43 +00:00
annalee
8e038835fe Merge remote-tracking branch 'upstream/master' into staging-next 2024-03-13 00:38:07 +00:00
Mario Rodas
54dce4f0ac Merge pull request #294889 from marsam/update-scsh
scsh: 0.7pre -> unstable-2024-03-10
2024-03-12 18:59:26 -05:00
Vladimír Čunát
d6cd575b84 Merge #295012: lua: actually fix longstanding bug in lua envHook
..causing relative module imports to stop working.
Merge into staging
2024-03-12 08:24:45 +01:00
stuebinm
2233ed700b gauche: set meta.mainProgram to gosh
This package provides multiple binaries, but `gosh' is the
interpreter which is actually used to run scheme scripts,
and so probably the one people think of when they say
"running Gauche Scheme".
2024-03-11 22:53:08 +01:00
github-actions[bot]
06e5eb63d3 Merge staging-next into staging 2024-03-11 18:01:53 +00:00
Nick Cao
c5be907013 Merge pull request #294264 from r-ryantm/auto-update/rune
rune: 0.13.1 -> 0.13.2
2024-03-11 11:12:30 -04:00
binarycat
b309d4fdcc lua: actually fix longstanding bug in lua envHook causing relative module imports to stop working
somehow, between all my testing, all the code review, and my code being copy-pasted into
other people's PRs, noone noticed the glaring issue in the singular line of code i committed.

there was a missing negation.  this has now been fixed.
2024-03-11 10:55:46 -04:00