2131 Commits
Author SHA1 Message Date
Silvan Mosberger e52d633a63 Merge remote-tracking branch 'upstream/staging-next' into staging 2025-04-02 18:30:54 +02:00
Timothy Gallion 0ce0b01c12 python3: Remove unneeded override in passthruFun
`pythonOnBuildForHost` is already overriden when it is passed to
`passthruFun` remove redundant override. Performace is slightly better
~200MB less memory.
2025-04-02 06:39:02 -04:00
Timothy Gallion c59bac08bd python3: Fixing excessive memory usage for overriden python
An attempt to address #338231. The current release of nixpkgs takes over
20GB of memory to evaluate python when the interpreter is overriden.
This adds memoization to the spliced python packages to avoid
evaluating all the commbinations of overrides.
2025-04-02 06:39:02 -04:00
Jörg Thalheim 5bf39d5b41 python3: disable static darwin builds 2025-04-02 11:17:56 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Yueh-Shun LiandGitHub d3a452aeec pytestCheckHook: support inclusion and exclusion of path globs, test items, keywords, and markers (#386513) 2025-03-24 07:15:58 +08:00
Yueh-Shun Li e1e072bf03 python3Packages.pytestCheckHook: support enabledTestMarks and disabledTestMarks 2025-03-23 23:51:16 +08:00
Yueh-Shun Li f7aeb5a9b7 python3Packages.pytestCheckHook: support enabledTests 2025-03-23 23:51:16 +08:00
Yueh-Shun Li f51e1c6766 python3Packages.pytestCheckHook: Make disabledTests support sub-expressions
Wrap each elements of disabledTests with parenthesis
so that when __structuredAttrs = true,
people could use sub-expressions an element.

E.g.
```nix
{
  disabledTests = [
    "ClassFoo and test_foo"
    "test_bar"
  ];
}
2025-03-23 23:10:09 +08:00
Yueh-Shun Li 4174f6ed5c python3Packages.pytestCheckHook: support enabledTestPaths 2025-03-23 23:10:04 +08:00
nixpkgs-ci[bot]andGitHub f02955ed47 Merge master into staging-next 2025-03-21 18:04:59 +00:00
Ihar Hrachyshka ef35af3b1a python311: fix _ctypes build on darwin
In Python 3.12+, the -DUSING_APPLE_OS_LIBFFI=1 macro is always set:
https://github.com/python/cpython/commit/25590eb5dee5176f3ac60916b19450f8198e7ffc

Fixes #390348

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-03-16 17:38:59 -04:00
nixpkgs-ci[bot]andGitHub e8a05cb8da Merge master into staging-next 2025-03-15 18:04:06 +00:00
Martin Weinelt 684efdc40c python314: 3.14.0a5 -> 3.14.0a6
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0-alpha-6
2025-03-15 16:07:11 +01:00
Yueh-Shun Li 16f8b50742 python3Packages.pytestCheckHook: support deselecting tests via disabledTestPaths
Pass disabledTestPaths elements containing double colons (::)
to --deselect instead of --ignore-glob.
2025-03-09 22:20:16 +08:00
Yueh-Shun Li 6bdb735bbe python3Packages.pytestCheckHook: append disableTests flags after disabledTestPaths flags 2025-03-09 22:20:16 +08:00
Yueh-Shun Li 55d08bb886 buildPythonPackage: simplify check-related attribute inheritance 2025-03-07 16:48:04 +08:00
Yueh-Shun Li 9346e6aa5f python3Packages.pytestCheckHook: add tests 2025-03-07 07:14:56 +08:00
Yueh-Shun Li 2e512e7cf7 python3Packages.pytestCheckHook: fix disabledTestPaths glob matching assertion
Errors in Bash's process substitution doesn't get propagated outside.

Replace the process substitution with Python's `-` as /dev/stdin and
Bash's heredoc stdin redirection.
2025-03-07 07:14:56 +08:00
Yueh-Shun Li ad8dfff2dd buildPythonPackage: add and use lib inheritance 2025-03-02 21:54:05 +08:00
Yueh-Shun Li f2cbc7da9e buildPythonPackage: sort lib inheritance 2025-03-02 21:51:24 +08:00
Yueh-Shun Li 2aa22b5edc buildPythonPackage: remove obsolete lib inheritance 2025-03-02 21:49:02 +08:00
Yueh-Shun Li 70322e2fa2 buildPythonPackage: format expression 2025-03-02 21:44:43 +08:00
Luka Blašković 964b5727cb python310/python311: fix failing tests with openssl >= 3.4 2025-02-18 21:31:14 +00:00
nixpkgs-ci[bot]andGitHub fc7fa5f568 Merge master into staging-next 2025-02-17 00:15:35 +00:00
Sandro Jäckel 4c468efa40 python3{9,10}.doc: fix build 2025-02-16 23:13:44 +01:00
Martin Weinelt 58cab06b5e python314: 3.14.0a4 -> 3.14.0a5
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0-alpha-5
2025-02-13 01:44:10 +01:00
Wolfgang Walther b19d0f6d3d treewide: replace substituteAll with replaceVars 2025-02-10 22:51:56 +01:00
K900andGitHub f81ec80ff8 bash: Make interactive by default (#379368) 2025-02-09 09:31:22 +03:00
Martin WeineltandGitHub d15ca73b55 buildPython*: make name-related attributes overridable via overrideAttrs (#376714) 2025-02-08 18:07:59 +01:00
Martin WeineltandGitHub 534cbec4c4 buildPython*: Enable direct attribute overriding via overrideAttrs (the staging ones) (#377057) 2025-02-08 18:07:30 +01:00
Martin WeineltandGitHub e641f79cd1 cpython: provide libuuid for the _uuid module (#377458)
* util-linuxMinimal: build without pam and shadow

These depend on python via audit preventing the use of libuuid from
util-linux in python builds.

* cpython: provide libuuid for the _uuid module

Relying on libuuid offers synchronization primitives, so that "no two
processes can obtain the same UUID"¹.

[1] https://docs.python.org/3/library/uuid.html#module-uuid
2025-02-08 16:16:43 +01:00
Silvan Mosberger e3491c9e40 bash: Make interactive the default
The status quo of `bash` not being interactive is frustrating for many users,
because trying to use it interactively is just messed up, and
`bashInteractive` is not intuitive and barely discoverable.

This was brought to my (and many others) attention by @stahnma in his
[talk at CfgMgmtCamp 2025](https://cfp.cfgmgmtcamp.org/ghent2025/talk/YUVUTN/),
where he highlighted this as one of the frustrations he ran into when
learning Nix.

Why this is fine:
- No reason for not making interactive the default was given in the original commit (6c6ff6f36f), but probably it was due to the increase in closure size
- The closure size only increases by 6.9MiB (19.5%) today, with the
  added dependency on the store paths for readline and ncurses, which
  are needed on systems in almost all cases anyways
- If somebody really needs to get a more minimal system, they can use
  the newly-introduced `bashNonInteractive` instead now
- Though to apply it consistently, they'll need to do that in an
  overlay like
  ```
  final: prev: {
    bash = self.bashNonInteractive;
  }
  ```

  Or alternatively using the `system.replaceDependencies.replacements`
  NixOS option approach.

While there's also other such `*Interactive` packages that could use the
same treatment, `bash` is a great start.

This was already attempted before in
https://github.com/NixOS/nixpkgs/pull/151227, but was not continued for
unknown reason.

To avoid stdenv becoming bigger, all uses of bash in the (working)
stdenv's are changed to the explicitly non-interactive version here.

This commit will however still cause a mass rebuild for all packages (and reverse deps)
making use of the default bash.
2025-02-05 00:31:46 +01:00
Martin Weinelt 5628a3fb23 python312: 3.12.8 -> 3.12.9
https://docs.python.org/release/3.12.9/whatsnew/changelog.html
2025-02-04 23:56:43 +01:00
Martin Weinelt 0690e42a7c python313: 3.13.1 -> 3.13.2
https://docs.python.org/release/3.13.2/whatsnew/changelog.html
2025-02-04 23:56:42 +01:00
Martin Weinelt 05a564a0d0 cpython: add isPy313, isPy314 helpers 2025-02-04 23:54:32 +01:00
Yueh-Shun Li 4134fdc75c buildPython*: always specify attributes catchConflicts and dontWrapPythonPrograms
Always specify catchConflicts and dontWrapPythonPrograms.

Make them overrideAttrs-overridable.
2025-02-04 06:36:24 +08:00
Yueh-Shun Li c540331279 buildPython*: make name-relaed attributes overridable via overrideAttrs
Make name, pname and version overridable via overrideAttrs
for Python packgaes constructed with buildPython*.
2025-02-04 02:11:22 +08:00
nixpkgs-ci[bot]andGitHub c721a7fb35 Merge staging-next into staging 2025-02-03 18:05:46 +00:00
K900 51575400a3 buildPython*: fix mismerge 2025-02-03 19:11:59 +03:00
nixpkgs-ci[bot]andGitHub c9f5d2d21e Merge staging-next into staging 2025-02-03 12:06:27 +00:00
K900 5c3fd0ab9f Merge remote-tracking branch 'origin/master' into staging-next 2025-02-03 09:17:01 +03:00
OTABI TomoyaandGitHub 82887d0b89 cpython: patch CVE-2025-0938 (#378410) 2025-02-02 18:59:00 +09:00
K900 c15f4ee007 Merge remote-tracking branch 'origin/master' into staging-next 2025-02-02 09:47:44 +03:00
Yueh-Shun Li 3678c2ea8d buildPython*: format expression after restructuring 2025-02-02 14:26:22 +08:00
Yueh-Shun Li 6d2625c64b buildPython*: remove redundant parenthesis
This commit is intentionally unformatted
for smoother merging and rebasing experience.
2025-02-02 14:26:22 +08:00
Yueh-Shun Li 2b6cde5354 buildPython*: move argument-dependent let-in variables down below finalAttrs
This commit is intentionally unformatted
for smoother merging and rebasing experience.
2025-02-02 14:26:22 +08:00
Yueh-Shun Li 04c39df325 buildPython*: abstract out transformDrv 2025-02-02 14:26:22 +08:00
Martin Weinelt c0a7f07a63 cpython: patch CVE-2025-0938
https://www.cve.org/CVERecord?id=CVE-2025-0938
2025-02-01 02:59:24 +01:00
Martin Weinelt 94e717e8ff cpython: provide libuuid for the _uuid module
Relying on libuuid offers synchronization primitives, so that "no two
processes can obtain the same UUID"¹.

[1] https://docs.python.org/3/library/uuid.html#module-uuid
2025-01-29 03:00:56 +01:00