Commit Graph

558 Commits

Author SHA1 Message Date
sternenseemann
a0a35b6c24 Fix cross eval issues (#362546) 2024-12-14 22:14:52 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Silvan Mosberger
84d4f874c2 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 78e9caf153
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:23:58 +01:00
Artturin
e700e52405 python2: Fix alias usage on cross 2024-12-08 22:01:38 +02:00
Martin Weinelt
7c0647e562 python312: fix memory exhaustion vulnerability in asyncio.protocols (#362523) 2024-12-08 15:17:41 +01:00
K900
2e337411b0 Merge remote-tracking branch 'origin/master' into staging-next 2024-12-08 08:46:20 +03:00
Wolfgang Walther
59953c2b3c python3: proper syntax for Windows patches (#351010) 2024-12-07 20:31:20 +01:00
Martin Weinelt
861d083530 python312: fix memory exhaustion vulnerability in asyncio.protocols
https://mail.python.org/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/

Fixes:CVE-2024-12254
2024-12-06 19:12:17 +01:00
Emily
63a7b4f143 python3: remove code for macOS < 11 2024-11-18 00:14:00 +00:00
Emily
a061b02a6f Revert "python{27,39,310,311,312,313,314}: use a bootstrap SDK on Darwin"
No longer necessary to mask an unwanted Python rebuild.

This reverts commit c455166b5f.
2024-11-07 19:09:09 +00:00
Emily
c455166b5f python{27,39,310,311,312,313,314}: use a bootstrap SDK on Darwin
Not sure why this is necessary now, since it should already be handled
as part of the bootstrap. This might not be the right fix but it does
fix eval.
2024-11-07 17:19:15 +00:00
Emily
22f2052ca1 python{27,39,310,311,312,313,314}: drop Darwin libutil patch 2024-11-06 00:53:02 +00:00
github-actions[bot]
b67a45959d Merge staging-next into staging 2024-10-27 00:16:01 +00:00
K900
f21f4ca3ee Merge remote-tracking branch 'origin/master' into staging-next 2024-10-26 21:05:47 +03:00
Francesco Gazzetta
68576df997 treewide: move tcl libraries under tclPackages 2024-10-26 16:23:15 +00:00
Greg Hellings
708a493c13 python3: proper syntax for Windows patches
Windows patches were being added with a shell glob, which was dying with
an error. See #351007. Use filesystem methods to walk the patch set and
retrieve the patch names.

Also, update the patches from the Fedora project to the latest for
Python 3.11.9 and add filtering for any that are already applied to the
3.11.10 in the current cycle.

python312 still fails to cross-compile after this patch, but at least
3.11 will again be available
2024-10-25 09:46:39 -05:00
Martin Weinelt
8044c0cc0a python314: init at 3.14.0a1
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0-alpha-1
2024-10-16 03:42:47 +02:00
Randy Eckenrode
092b50a92c python3: fix stdenv bootstrap on x86_64-darwin
The bootstrap tools linker sometimes crashes when trying to link the
sqlite3 tests, which causes the bootstrap Python not to have the sqlite3
module. This causes the freezegun module to fail to build later in the
bootstrap. Using the 11.0 SDK fixes the problem.

Upstream Python supports building with a newer SDK and back-deploying,
so this change should not negatively affect users on pre-11.0 releases.
2024-10-10 16:23:09 -04:00
Randy Eckenrode
3e5316cb96 python3: drop configd
configd is an alias for the SystemConfiguration framework, which is now
always part of the SDK. Removing this parameter because it effectively
does nothing now, which could be misleading to users.
2024-10-10 16:23:08 -04:00
Randy Eckenrode
b62e262366 python27: drop configd
configd is an alias for the SystemConfiguration framework, which is now
always part of the SDK. Removing this parameter because it effectively
does nothing now, which could be misleading to users.
2024-10-10 16:23:08 -04:00
github-actions[bot]
27e693e46c Merge master into staging-next 2024-09-30 18:04:40 +00:00
Martin Weinelt
a2ed02c4c2 cpython: add python team as maintainers 2024-09-30 19:41:04 +02:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Alyssa Ross
b2f01b8861 python3: get the triple from the build system
We don't need the sysconfigdata name at eval time, so trying to
reimplement platform_triplet.c in Nix is unnecessarily painful
compared to just getting it from the build system after the fact.
2024-09-10 17:32:02 +02:00
github-actions[bot]
d8c78f272c Merge staging-next into staging 2024-08-30 18:04:32 +00:00
github-actions[bot]
b857d97eec Merge master into staging-next 2024-08-30 18:04:02 +00:00
Martin Weinelt
0ea153ce17 python313FreeThreading: fix build
The build uses a `t` suffix on the lib prefix.
2024-08-28 01:15:37 +02:00
OTABI Tomoya
7ccd711f35 python{39,310,311,312,313}: Allow using cc to resolve dynamic libraries (#328943) 2024-08-27 21:45:22 +09:00
K900
5c68540f8b Merge remote-tracking branch 'origin/staging-next' into staging 2024-08-22 13:20:38 +03:00
Alyssa Ross
007088359e python3: break infinite recursion
Checking if bluez is a derivation requires evaluating whether an
emulator is available (in the case that gobject-introspection is
available), which when cross compiling requires evaluating qemu, which
requires evaluating libxml2, which requires evaluating Python.

The recursion break happens in the Python expression because it's the
thing behaving unusually, by forcing evaluation of all of its
arguments, even ones that are optional and unused.

Fixes: 8b3a4a617e ("bluez: fix when gobject-introspection unsupported")
2024-08-21 18:45:30 +02:00
Tobias Mayer
f4917d2893 pkgsStatic.python312: fix build 2024-08-20 10:48:39 +02:00
Martin Weinelt
8878d8afcd python312: 3.12.4 -> 3.12.5
https://docs.python.org/release/3.12.5/whatsnew/changelog.html
2024-08-08 15:36:12 +02:00
Martin Weinelt
93f4195fe0 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/applications/graphics/seamly2d/default.nix
2024-07-26 18:05:04 +02:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Audrey Dutcher
66d41e75e8 python{39,310,311,312,313}: Allow using cc to resolve dynamic libraries
This patch hasn't been complete since an alternate case was added to
cpython which allows using ld(1) to resolve libraries. In addition to
this, the stated reason for the patch, to improve startup times by
preventing cpython from invoking gcc to resolve libuuid, has not been an
issue since that logic was removed in cpython 3.9. Finally, this patch
creates a disparity between Linux and other operating systems (I am
working on FreeBSD right now) since the ld(1) case is system gated.

Since it no longer accomplishes its stated purpose, is no longer needed,
and creates platform disparities, we should remove it.

I've left the half of this patch which prevents /sbin/ldconfig from
being invoked, since no nix-compiled program should ever be invoking
absolute paths like this.
2024-07-20 23:56:42 -07:00
Randy Eckenrode
0e8dbe9540 python313: drop patch for _PY_SHORT_FLOAT_REPR == 0
The patch was merged upstream and is included in Python 3.13b4.
2024-07-21 00:26:22 -04:00
Randy Eckenrode
53f938e573 python{310,311,312,313}: fix LTO build
Python LTO builds using clang require the clang’s `llvm-ar` even on Darwin.
2024-07-20 21:33:28 -04:00
Randy Eckenrode
d5f637590e tree-wide: enable LTO on Darwin 2024-07-20 03:19:54 -04:00
Randy Eckenrode
0d7d9280d3 python{311,312,313}: use system libmpdec again
Override the configure check not to do a universal build. Using the system libmpdec is required to enable LTO on Darwin.
2024-07-20 01:11:53 -04:00
Alyssa Ross
aba1b58d1f python312: make portability backport unconditional
This avoids the maintenance headache associated with conditionally
applied patches, and fixes building for s390.
2024-07-17 12:33:29 +02:00
Yureka
8cfb27bc21 python3*: backport fix for armv7l, aarch64, riscv64
Co-Authored-By: Florian Klink <flokli@flokli.de>
Signed-off-by: Yureka <fork-nixpkgs-with@yuka.dev>
2024-07-07 12:19:22 +03:00
K900
bde999c03e Merge branch 'master' into staging-next 2024-06-29 10:13:13 +03:00
Martin Weinelt
27b67c584a cpython: fix changelog anchor for beta versions 2024-06-28 13:19:35 +02:00
Randy Eckenrode
da8f4fd6cb python3Minimal: ensure _scproxy is disabled on Darwin
Python 3.12 attempts to build with the _scproxy enabled even when building python3Minimal. Override the configure check to make sure it is disabled. Otherwise, the Darwin stdenv bootstrap will fail.
2024-06-26 19:41:29 -04:00
Alyssa Ross
3df6bb2c85 Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/applications/blockchains/polkadot/default.nix
2024-06-09 22:47:12 +01:00
Alexis Hildebrandt
755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00
github-actions[bot]
668adff0d4 Merge master into staging-next 2024-06-09 12:01:06 +00:00
Audrey Dutcher
22913c86f1 python3: Enable FreeBSD cross build
This only enables x86_64-unknown-freebsd, not any other FreeBSD, since I
do not have any other machines to tests on. If you're reading this, feel
free to try out other arches!
2024-06-07 20:28:29 -07:00
Randy Eckenrode
07ab74e4aa python3: fix build on Darwin
https://github.com/NixOS/nixpkgs/pull/311767 improved build purity, but Python’s configure script checks the Darwin version to enable platform features. Replacing the check with a check for Darwin without the version allows the build to succeed again.
2024-05-30 19:40:13 -04:00