Commit Graph

481 Commits

Author SHA1 Message Date
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
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
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00
Pol Dellaiera 65a333600d treewide: replace rev with tag 2025-04-07 16:57:22 +02:00
Martin Weinelt 175fb278c1 python3: Fixing excessive memory usage for overriden python in cross-compile (#394541) 2025-04-04 23:26:37 +02: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
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
Luka Blašković 964b5727cb python310/python311: fix failing tests with openssl >= 3.4 2025-02-18 21:31:14 +00:00
nixpkgs-ci[bot] 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
K900 f81ec80ff8 bash: Make interactive by default (#379368) 2025-02-09 09:31:22 +03:00
Martin Weinelt 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 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
Martin Weinelt b734fd2caf python314: 3.14.0a2 -> 3.14.0a3
https://docs.python.org/3.14/whatsnew/changelog.html#python-3-14-0-alpha-3
2025-01-17 19:47:29 +09:00
FliegendeWurst 6658ddfa50 python311: fix mingwW64 cross, mark as broken for other versions 2025-01-08 18:39:21 +01:00
github-actions[bot] 8c5656aa89 Merge master into staging-next 2024-12-15 00:17:27 +00:00
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 https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.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 https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.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