2131 Commits
Author SHA1 Message Date
Stefan Frijters b9195a7fb6 python2: fix paths for structuredAttrs
Without this, things like zlib are not found.
2025-12-14 00:53:58 +01:00
nixpkgs-ci[bot]andGitHub 9d911c99bc Merge staging-next into staging 2025-12-12 12:08:28 +00:00
dotlambdaandGitHub 195e2bc55c python3Packages.setuptools-rust: fix cross build for all setuptools-rust based packages (#467817) 2025-12-11 06:25:13 +00:00
Matt Sturgeon 553a6c3d3a buildPython*: preserve overrideStdenvCompat on subsequent overrides
This is needed to support the deprecated method of overriding `stdenv`
via `overridePythonAttrs`.
2025-12-11 01:15:17 +00:00
Matt Sturgeon 32ecc2256b buildPython*: remove stdenv arg in overrideStdenvCompat
Avoid passing `stdenv` to the underlying function when it is already
handled in overrideStdenvCompat.
2025-12-11 01:07:55 +00:00
Matt Sturgeon 9d87f178ed buildPython*: switch overrideStdenvCompat to mirrorFunctionArgs
The underlying `mk-python-derivation.nix` functions do not have `stdenv`
in their functionArgs, so it was redundant to explicitly remove it.
2025-12-11 01:07:55 +00:00
Matt Sturgeon 37655d3b36 buildPython*: rename override param in makeOverridablePythonPackage
`fdrv` → `newArgs`; the parameter is not a derivation, so fdrv is
confusing.
2025-12-11 01:07:55 +00:00
nixpkgs-ci[bot]andGitHub 795ce4c7c1 Merge staging-next into staging 2025-12-11 00:19:41 +00:00
Yueh-Shun LiandGitHub ff13d8ce45 makeOverridablePythonPackage: simplify implementation and make compatible with <pkg>.overrideAttrs (#267296) 2025-12-10 19:06:55 +00:00
Wolfgang Walther 46c0c0eae7 Merge branch 'staging-next' into staging 2025-12-10 18:42:31 +01:00
Ihar HrachyshkaandWolfgang Walther 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
Yueh-Shun LiandMatt Sturgeon ca6c090082 makeOverridablePythonPackage: take care of overrideAttrs
Make it possible to mix overridePythonAttrs and overrideAttrs, i.e.
((<pkg>.overrideAttrs (_: { foo = "a"; })).overridePythonAttrs (_: { })).foo now works

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
2025-12-10 19:22:04 +08:00
Yueh-Shun LiandMatt Sturgeon e8302431ef makeOverridablePythonPackage: simplify implementation
Attach overridePythonAttrs by attribute set update
instead of `stdenv.mkDerivation`'s `passthru`.

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
2025-12-10 19:20:01 +08:00
DavHau e656303867 python3Packages.setuptools-rust: fix cross build for all setuptools-rust based packages
Prior to this change all python packages using `setuptools-rust` were broken when cross compiled as they built binaries for the build platform instead of for the host platform.

The setuptoolsRustBuildHook hook would have to be included as a native build input instead of the `setuptools-rust` package, but practically wasn't used anywhere.

This change makes it so that `setuptoolsRustBuildHook` becomes unnecessary, and instead `setuptools-rust` propagates a setup-hook directly setting up the build environment, similar to how cmake does it when included via nativeBuildInputs.

This change fixes cross on all packages using `setuptools-rust` as a build-system.
2025-12-09 12:32:28 +07:00
nixpkgs-ci[bot]andGitHub 06f61d8b32 Merge staging-next into staging 2025-12-07 00:20:08 +00:00
Audrey Dutcher 5f12790a4c python3: Fix cross compilation to FreeBSD
- autoreconf needs to be run if we patch configure.ac
- the patch lines need to be adjusted otherwise it applies wrong
2025-12-06 15:51:49 -07:00
Martin Weinelt 7b9787935a Revert "cpython: fix gh-142214 on 3.14.1"
This reverts commit 27dcfd3e04.

This was fixed in 3.14.2 and as such this patch application has become
obsolete.
2025-12-06 01:20:01 +01:00
Martin Weinelt d7040cdaee Revert "cpython: fix gh-142218 on 3.13.10 and 3.14.1"
This reverts commit ae4f7fd1e9.

Fixed in 3.13.11 and 3.14.2 and as such obsoleted.
2025-12-06 01:20:00 +01:00
Martin Weinelt 9dde8c194a python314: 3.14.1 -> 3.14.2
https://docs.python.org/release/3.14.2/whatsnew/changelog.html
2025-12-06 01:20:00 +01:00
Martin Weinelt c83a2227bb python313: 3.13.10 -> 3.13.11
https://docs.python.org/release/3.13.11/whatsnew/changelog.html
2025-12-06 00:03:25 +01:00
Martin Weinelt 27dcfd3e04 cpython: fix gh-142214 on 3.14.1
Fixes two regressions in dataclasses.
2025-12-05 16:24:33 +01:00
Martin Weinelt ae4f7fd1e9 cpython: fix gh-142218 on 3.13.10 and 3.14.1
Fixes split table dictionary crash regression.
2025-12-05 02:40:35 +01:00
Martin Weinelt a2ccc79edb python314: 3.14.0 -> 3.14.1
https://docs.python.org/release/3.14.1/whatsnew/changelog.html
2025-12-03 10:12:17 +01:00
Martin Weinelt 367dac5dcf python313: 3.13.9 -> 3.13.10
https://docs.python.org/release/3.13.10/whatsnew/changelog.html
2025-12-03 10:12:14 +01:00
nixpkgs-ci[bot]andGitHub d3cf03ff89 Merge staging-next into staging 2025-11-26 06:07:32 +00:00
Guillaume GirolandGitHub 8a2af5ab6f cross: Fix shebang of installed python scripts (#462993) 2025-11-24 20:09:11 +00:00
Martin Weinelt 3f07d3c307 python315: 3.15.0a1 -> 3.15.0a2
https://docs.python.org/3.15/whatsnew/changelog.html#python-3-15-0-alpha-2
2025-11-23 17:20:25 +01:00
Guillaume Girol 6724e26a08 Fix shebang of installed python scripts
Closes: https://github.com/NixOS/nixpkgs/pull/449340
Fixes: https://github.com/NixOS/nixpkgs/issues/449325
2025-11-18 12:00:00 +00:00
qbisi abe61db737 python-env: wrap python executable with --resolve-argv0
This commit, together with https://github.com/NixOS/nixpkgs/pull/442540,
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 also resolve argv[0] to absolute path when invoking python from
    PATH. This helps set python's prefix correctly on Darwin.

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.
2025-11-16 11:19:14 +08:00
Martin WeineltandGitHub 9e9a4bea72 python: fix nixenv test (#457133) 2025-11-03 22:04:37 +00:00
qbisi 14fe4b34de python: fix nixenv test 2025-10-31 09:08:04 +08:00
nixpkgs-ci[bot]andGitHub c522ea5070 Merge staging-next into staging 2025-10-28 18:06:54 +00:00
Philip TaronandGitHub 01898764b6 treewide: replace "yes" else "no" usages to lib.boolToYesNo (#442387) 2025-10-28 16:25:46 +00:00
K900 c42a763484 Merge remote-tracking branch 'origin/staging-next' into staging 2025-10-27 21:12:17 +03:00
Philip TaronandGitHub 4160763d74 various: lib usage improvements - prefer elem over any for list inclusion conditions (#455789) 2025-10-27 13:21:20 +00:00
K900 0eb2b2c825 Merge remote-tracking branch 'origin/staging-next' into staging 2025-10-27 10:53:50 +03:00
h7x4 7720a6246f pypy: lib.mapAttrsToList -> lib.attrsNames 2025-10-26 15:33:34 +09:00
h7x4 92aa43a0df pypy3: lib.mapAttrsToList -> lib.attrsNames 2025-10-26 15:33:34 +09:00
h7x4 ff17d6952f pypy: lib.any -> lib.elem 2025-10-26 15:31:35 +09:00
K900 0b0c249f09 Merge remote-tracking branch 'origin/staging-next' into staging 2025-10-25 10:00:19 +03:00
sternenseemann 0443b98ab3 buildPython*: unconditionally add .override
To be able to splice, we can't fail to eval before returning an
attribute set. By checking for f ? override, we need to force f which
isn't always possible, whereas mirrorFunctionArgs serves as an
indirection which wraps the inner thunks in an attribute set that can
always be returned. Fortunately, there should be no case when f
evaluates successfully and does not have the override attribute, so we
can just remove the condition.

This fixes evaluation of buildPython* based packages in certain splicing
situations by being lazier. An example of this is
pkgsCross.ghcjs.buildPackages.nixpkgs-openjdk-updater on staging right
now (ff5098e).
2025-10-25 00:15:34 +02:00
Yueh-Shun LiandMatt Sturgeon e05528c65f buildPython*: warn about deprecated argument stdenv
On Nixpkgs >= 26.05 (or precisely, oldest supported release >= 25.11),
warn about the use of buildPython*'s deprecated argument `stdenv`.

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
2025-10-23 14:56:56 +08:00
Yueh-Shun Li c4e3b67afb buildPython*: allow stdenv customization through <function>.override 2025-10-23 14:51:18 +08:00
nixpkgs-ci[bot]andGitHub 882482ed0e Merge staging-next into staging 2025-10-22 19:50:01 +00:00
Yueh-Shun LiandGitHub 7a4ad371b1 buildPython*: bring back buildPython*.override (#366593) 2025-10-22 19:20:10 +00:00
Yueh-Shun Li cce0f3f300 buildPython*: bring back buildPython*.override
Fix `makeOverridablePythonPackage` in python-package-base.nix
and unshadow `buildPython*.override`.

This makes it possible to override the dependencies of buildPython*.
E.g., `buildPythonPackage.override { unzip = unzip-custom; }`
returns a derived version of `buildPythonPackage` with
the `unzip` package overridden with `unzip-custom`.
2025-10-23 03:08:33 +08:00
Aliaksandr 80f12557f5 treewide: replace "yes" else "no" usages to lib.boolToYesNo 2025-10-21 16:04:34 +03:00
Martin WeineltandGitHub cf974c4169 python: fix venv creation (#442540) 2025-10-19 18:34:47 +00:00
nixpkgs-ci[bot]andGitHub a6b2560cff Merge staging-next into staging 2025-10-15 18:06:33 +00:00
nixpkgs-ci[bot]andGitHub 003c57b969 Merge master into staging-next 2025-10-15 18:05:52 +00:00