Commit Graph
530 Commits
Author SHA1 Message Date
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
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
nixpkgs-ci[bot]andGitHub c522ea5070 Merge staging-next into staging 2025-10-28 18:06:54 +00:00
Aliaksandr 80f12557f5 treewide: replace "yes" else "no" usages to lib.boolToYesNo 2025-10-21 16:04:34 +03: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
Martin Weinelt 6785773052 python315: init add 3.15.0a1
https://docs.python.org/3.15/whatsnew/changelog.html#python-3-15-0-alpha-1
2025-10-15 18:01:30 +02:00
Luna Nova e7fbed853b treewide: remove usages of obsolete pie hardening flag 2025-10-09 10:13:03 -07:00
nixpkgs-ci[bot]andGitHub a9361cb4df Merge staging-next into staging 2025-10-05 09:12:50 +00:00
Martin WeineltandGitHub dd8ce7bda9 pythonInterpreters: Add passthru.pythonABITags (#445140) 2025-10-05 01:17:18 +00:00
nixpkgs-ci[bot]andGitHub e23d356469 Merge staging-next into staging 2025-10-05 00:18:23 +00:00
NAHO c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02:00
ghpzin b95b6d641e python27: fix build with gcc15
- add " -std=gnu17" to `env.NIX_CFLAGS_COMPILE`

Fixes build failure with gcc15:
```
In file included from Include/Python-ast.h:3,
                 from Python/bltinmodule.c:4:
Include/asdl.h:9:15: error: cannot use keyword 'false' as enumeration constant
    9 | typedef enum {false, true} bool;
      |               ^~~~~
Include/asdl.h:9:15: note: 'false' is a keyword with '-std=c23' onwards
Include/asdl.h:9:28: error: expected ';', identifier or '(' before 'bool'
    9 | typedef enum {false, true} bool;
      |                            ^~~~
Include/asdl.h:9:28: warning: useless type name in empty declaration
In file included from Include/Python-ast.h:3,
                 from Python/compile.c:26:
Include/asdl.h:9:15: error: cannot use keyword 'false' as enumeration constant
    9 | typedef enum {false, true} bool;
      |               ^~~~~
Include/asdl.h:9:15: note: 'false' is a keyword with '-std=c23' onwards
Include/asdl.h:9:28: error: expected ';', identifier or '(' before 'bool'
    9 | typedef enum {false, true} bool;
      |                            ^~~~
```
2025-09-25 18:03:25 +03:00
adisbladis 3e6a5988c7 pythonInterpreters: Add passthru.pythonABITags
As documented in https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/#abi-tag.

This is useful to check whether a wheel is compatible with a certain interpreter. [Pyproject.nix](https://github.com/pyproject-nix/pyproject.nix) has [functions to perform wheel compatibility checking](https://pyproject-nix.github.io/pyproject.nix/lib/pypa.html#function-library-lib.pypa.isWheelFileCompatible) against a Python interpreter, and has computed interpreter ABI tags itself.
The recent addition of free threading (`python313FreeThreading`) complicates this by not being introspectable:
A GIL Python (non free-threaded) has an ABI tag `cp313` while the free-threaded Python has `cp313t`, but the package doesn't communicate whether `enableGIL` is true or false, leaving no way to compute the tag.
The same goes for if debugging support was added to the derivation: A `d` suffix would need to be added.

Additionally ABI tags has no defined format and can really only be accurately computed by having insight into how the ABI tags are used by a specific interpreter, meaning that the only correct place to compute ABI tags is within the context of a particular Python derivation.

While this has no immediate use within nixpkgs it could be used as a basis to provide compatibility assertions regarding wheel compat at eval time.
2025-09-22 16:36:36 +12:00
Martin Weinelt 251d713d0c cpython: build with bluetooth support in default build
Closes: #341001
2025-08-30 14:48:04 +02:00
Martin Weinelt bba34e2f19 cpython: remove x11support
This is required for tkinter, which we now build standalone as tkinter
in the python package set.
2025-08-30 14:28:10 +02:00
Martin Weinelt 168959b55b cpython: disable pie on aarch64-linux minimal
The intermediate pythonMinimal build that uses the glibc from bootstrap
files cannot currently be built with PIE, because the Scrt.o startup
script is missing in there.
2025-08-29 15:38:31 +02:00
Martin WeineltandGitHub 996d406da0 cpython: enable pie (#437366) 2025-08-28 23:55:16 +02:00
Martin Weinelt 38ba6fb329 cpython: enable pie 2025-08-24 00:02:49 +02:00
Martin Weinelt 4345a37636 python313: 3.13.6 -> 3.13.7
https://docs.python.org/release/3.13.7/whatsnew/changelog.html
2025-08-14 23:14:35 +02:00
Martin Weinelt 8dbf0b3423 cpython: remove libxcrypt on 3.13 and newer
The 3.13 release dropped support for the crypt module, so this dependency
could have been dropped much earlier.

Drops the `withLibxcrypt` argument, because manging the default has
become quite a bit more complicated.
2025-08-13 22:16:01 +02:00
Martin Weinelt 5f974fa39f python313: revert commit that locks ssl sockets
This breaks among other things the websockets package and is due to be
reverted in 3.13.7.
2025-08-10 00:06:16 +02:00
DavHauandMartin Weinelt 9edd40908d python3Minimal: remove pkg-config dependency
Removes the build time dependency on pkg-config if python3 is build with the `withMinimal` flag enabled

This change is driven by the motivation to use python3 earlier in stdenv for hooks.
2025-08-09 19:04:52 +02:00
DavHauandMartin Weinelt bce0bb82a0 python3Minimal: refactor - add withMinimal flag
simplifies the interface of building cpython minimally
2025-08-09 19:04:51 +02:00
Emily 5ba6a021b5 python3: fix build directory scrubbing 2025-08-03 20:52:24 +01:00
Ross Smyth bb7c7900e1 rocksdb, s7, python3, flint, release-cross: mingw_w64_pthreads -> pthreads 2025-08-01 15:47:52 -04:00
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Guillaume GirolandGitHub 2ab3ac5c2b separateDebugInfo: add symlinks to executable and source for debuginfod support (#394674) 2025-06-20 23:09:03 +02:00
nixpkgs-ci[bot]andGitHub 93aa3b82df Merge master into staging-next 2025-06-18 00:17:19 +00:00
Martin Weinelt 79558756d1 python314: 3.14.0b2 -> 3.14.0b3
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0-beta-3
2025-06-18 00:40:46 +02:00
Guillaume Girol 832e521ef9 python: __structuredAttrs = true
needed by separateDebugInfo = true
2025-06-14 22:14:56 +02:00
K900 7479f39034 Merge remote-tracking branch 'origin/master' into staging-next 2025-06-09 18:08:45 +03:00
natsukium 94552b6dbd python314: address CVE-2025-4517, CVE-2025-4330, CVE-2025-4138, CVE-2024-12718, CVE-2025-4435
https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7ATZNDVEGGHUMQMUUKLG/

https://www.cve.org/CVERecord?id=CVE-2025-4517
https://www.cve.org/CVERecord?id=CVE-2025-4330
https://www.cve.org/CVERecord?id=CVE-2025-4138
https://www.cve.org/CVERecord?id=CVE-2024-12718
https://www.cve.org/CVERecord?id=CVE-2025-4435
2025-06-09 19:43:43 +09:00
Martin Weinelt 4fa55ce14d Merge remote-tracking branch 'origin/master' into staging-next 2025-05-31 13:30:35 +02:00
Kamil MoniczandGitHub 554c97036d python314: add zstd dependency (#409307) 2025-05-31 16:18:46 +09:00
nixpkgs-ci[bot]andGitHub 3025596725 Merge master into staging-next 2025-05-31 00:16:33 +00:00
Alyssa Ross cc5ca4513f python313: fix static for x86_64-linux
Tries to build a shared library.
2025-05-30 20:44:09 +02:00
Peder Bergebakken Sundt 851756b3af treewide: remove unreferenced patch files 2025-05-25 00:46:53 +02:00
Martin Weinelt eda65094fb python313Packages.aiodns: 3.3.0 -> 3.4.0
https://github.com/saghul/aiodns/releases/tag/v3.4.0
2025-05-23 16:27:47 +02:00
Martin Weinelt 9ed0a391e0 cpython: drop leftover CVE-2025-0398 patch
Fixes: 090848175d
2025-05-23 16:27:21 +02:00
nixpkgs-ci[bot]andGitHub 93d5cbe07b Merge staging-next into staging 2025-05-23 06:06:33 +00:00
Guillermo RodriguezandGitHub 12b46122bc cpython: add enableDebug argument to enable "--with-pydebug" during build (#409943) 2025-05-23 03:18:56 +02:00
DavHau b634edb1a4 python3Minimal: make it truly minimal
Make python3 minimal truly minimal by disabling some more dependencies.

This makes it easy to bootstrap python.

After this, the only remaining runtime deps for python3Minimal are:
- bash (for launching subprocesses with shell=True)
- libc
- libgcc
- libffi

All remaining deps seem to be fundamental and cannot be further reduced, except bash which could potentially be removed and replaced with `$SHELL` at runtime.

Done:
- add some more withXXX switches to the cpython package
- use new switches in python3Minimal to disable some deps
- set some other deps to null in python3Minimal
- Set `allowedReferences` to guarantee that the closure remains minimal in the future.
2025-05-13 01:02:39 +07:00
K900 f96ac2dcd6 Merge remote-tracking branch 'origin/master' into staging-next 2025-04-26 09:07:48 +03:00
Fernando Rodrigues 05580f4b44 treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00
K900 73a91e9c9d Merge remote-tracking branch 'origin/staging-next' into staging 2025-04-13 09:07:29 +03:00
Martin Weinelt 8e93fb0f32 python39: drop before the 25.05 branch-off
End of security support is scheduled for 2025-10-31, which does not cover
the complete 25.05 release cycle.
2025-04-13 01:26:42 +02:00
Martin Weinelt 090848175d python311: 3.11.11 -> 3.11.12
https://docs.python.org/release/3.11.11/whatsnew/changelog.html
2025-04-09 14:21:21 +02:00
Martin Weinelt 2eeda516c8 python310: 3.10.16 -> 3.10.17
https://docs.python.org/release/3.10.16/whatsnew/changelog.html
2025-04-09 14:21:20 +02:00