diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md index bbc5da116a6a..acbfb306b4ff 100644 --- a/doc/languages-frameworks/python.section.md +++ b/doc/languages-frameworks/python.section.md @@ -50,7 +50,6 @@ sets are * `pkgs.python27Packages` * `pkgs.python3Packages` -* `pkgs.python39Packages` * `pkgs.python310Packages` * `pkgs.python311Packages` * `pkgs.python312Packages` diff --git a/nixos/doc/manual/development/option-declarations.section.md b/nixos/doc/manual/development/option-declarations.section.md index 112c4f054f2a..efccba3da37c 100644 --- a/nixos/doc/manual/development/option-declarations.section.md +++ b/nixos/doc/manual/development/option-declarations.section.md @@ -158,14 +158,14 @@ lib.mkOption { ::: {#ex-options-declarations-util-mkPackageOption-extraDescription .example} ### `mkPackageOption` with additional description text ```nix -mkPackageOption pkgs [ "python39Packages" "pytorch" ] { +mkPackageOption pkgs [ "python312Packages" "torch" ] { extraDescription = "This is an example and doesn't actually do anything."; } # is like lib.mkOption { type = lib.types.package; - default = pkgs.python39Packages.pytorch; - defaultText = lib.literalExpression "pkgs.python39Packages.pytorch"; + default = pkgs.python312Packages.torch; + defaultText = lib.literalExpression "pkgs.python312Packages.torch"; description = "The pytorch package to use. This is an example and doesn't actually do anything."; } ``` diff --git a/pkgs/applications/audio/easyabc/default.nix b/pkgs/applications/audio/easyabc/default.nix index 16026b12750d..c04a26d20483 100644 --- a/pkgs/applications/audio/easyabc/default.nix +++ b/pkgs/applications/audio/easyabc/default.nix @@ -1,9 +1,8 @@ { lib, fetchFromGitHub, - fetchPypi, replaceVars, - python39, + python3, fluidsynth, soundfont-fluid, wrapGAppsHook3, @@ -12,51 +11,18 @@ ghostscript, }: -let - # requires python39 due to https://stackoverflow.com/a/71902541 https://github.com/jwdj/EasyABC/issues/52 - python = python39.override { - self = python; - packageOverrides = self: super: { - # currently broken with 4.2.1 - # https://github.com/jwdj/EasyABC/issues/75 - wxpython = super.wxpython.overrideAttrs (args: rec { - version = "4.2.0"; - src = fetchPypi { - inherit version; - pname = "wxPython"; - hash = "sha256-ZjzrxFCdfl0RNRiGX+J093+VQ0xdV7w4btWNZc7thsc="; - }; - }); - }; - }; -in -python.pkgs.buildPythonApplication { +python3.pkgs.buildPythonApplication { pname = "easyabc"; - version = "1.3.8.6"; + version = "1.3.8.7-unstable-2025-01-12"; + format = "other"; src = fetchFromGitHub { owner = "jwdj"; repo = "easyabc"; - rev = "6461b2c14280cb64224fc5299c31cfeef9b7d43c"; - hash = "sha256-leC3A4HQMeJNeZXArb3YAYr2mddGPcws618NrRh2Q1Y="; + rev = "2cfa74d138d485523cae9b889186add3a249f2e4"; + hash = "sha256-96Rh7hFWITIC62vs0bUtatDDgJ27UdZYhku8uqJBJew="; }; - nativeBuildInputs = [ wrapGAppsHook3 ]; - - propagatedBuildInputs = with python.pkgs; [ - cx-freeze - wxpython - pygame - ]; - - # apparently setup.py only supports Windows and Darwin - # everything is very non-standard in this project - dontBuild = true; - format = "other"; - - # https://discourse.nixos.org/t/packaging-mcomix3-python-gtk-missing-gsettings-schemas-issue/10190/2 - strictDeps = false; - patches = [ (replaceVars ./hardcoded-paths.patch { fluidsynth = "${fluidsynth}/lib/libfluidsynth.so"; @@ -65,6 +31,22 @@ python.pkgs.buildPythonApplication { }) ]; + nativeBuildInputs = [ wrapGAppsHook3 ]; + + dependencies = with python3.pkgs; [ + cx-freeze + wxpython + pygame + pyparsing + ]; + + # apparently setup.py only supports Windows and Darwin + # everything is very non-standard in this project + dontBuild = true; + + # https://discourse.nixos.org/t/packaging-mcomix3-python-gtk-missing-gsettings-schemas-issue/10190/2 + strictDeps = false; + installPhase = '' runHook preInstall @@ -76,7 +58,7 @@ python.pkgs.buildPythonApplication { ln -s ${abcmidi}/bin/abc2abc $out/share/easyabc/bin/abc2abc ln -s ${abcm2ps}/bin/abcm2ps $out/share/easyabc/bin/abcm2ps - makeWrapper ${python.interpreter} $out/bin/easyabc \ + makeWrapper ${python3.interpreter} $out/bin/easyabc \ --set PYTHONPATH "$PYTHONPATH:$out/share/easyabc" \ --add-flags "-O $out/share/easyabc/easy_abc.py" diff --git a/pkgs/by-name/cj/cjdns/package.nix b/pkgs/by-name/cj/cjdns/package.nix index 9b6979ba9a20..45616081a481 100644 --- a/pkgs/by-name/cj/cjdns/package.nix +++ b/pkgs/by-name/cj/cjdns/package.nix @@ -5,7 +5,7 @@ rustPlatform, nodejs, which, - python39, + python3, libuv, util-linux, nixosTests, @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ which - python39 + python3 nodejs pkg-config ] @@ -66,11 +66,11 @@ rustPlatform.buildRustPackage rec { passthru.tests.basic = nixosTests.cjdns; meta = with lib; { + broken = true; # outdated, incompatible with supported python versions homepage = "https://github.com/cjdelisle/cjdns"; description = "Encrypted networking for regular people"; license = licenses.gpl3Plus; maintainers = with maintainers; [ ehmry ]; platforms = platforms.linux; - broken = stdenv.hostPlatform.isAarch64; }; } diff --git a/pkgs/development/compilers/flutter/engine/package.nix b/pkgs/development/compilers/flutter/engine/package.nix index e18c31ccdbec..f960a9d99f28 100644 --- a/pkgs/development/compilers/flutter/engine/package.nix +++ b/pkgs/development/compilers/flutter/engine/package.nix @@ -37,7 +37,6 @@ pkg-config, ninja, python312, - python39, gitMinimal, version, flutterVersion, @@ -58,7 +57,7 @@ let constants = callPackage ./constants.nix { platform = stdenv.targetPlatform; }; - python3 = if lib.versionAtLeast flutterVersion "3.20" then python312 else python39; + python3 = python312; src = callPackage ./source.nix { inherit diff --git a/pkgs/development/cuda-modules/cuda/overrides.nix b/pkgs/development/cuda-modules/cuda/overrides.nix index ece0788fb46f..a8ccbff06aa9 100644 --- a/pkgs/development/cuda-modules/cuda/overrides.nix +++ b/pkgs/development/cuda-modules/cuda/overrides.nix @@ -159,7 +159,6 @@ filterAndCreateOverrides { expat, libxcrypt-legacy, ncurses6, - python39, python310, python311, python312, @@ -176,7 +175,6 @@ filterAndCreateOverrides { ++ lib.lists.optionals (cudaAtLeast "12.5") [ libxcrypt-legacy ncurses6 - python39 python310 python311 python312 diff --git a/pkgs/development/cuda-modules/cudatoolkit/default.nix b/pkgs/development/cuda-modules/cudatoolkit/default.nix index 234bbf6c76b2..15681c2b31c3 100644 --- a/pkgs/development/cuda-modules/cudatoolkit/default.nix +++ b/pkgs/development/cuda-modules/cudatoolkit/default.nix @@ -29,7 +29,6 @@ patchelf, perl, python3, # FIXME: CUDAToolkit 10 may still need python27 - python39, python310, python311, pulseaudio, @@ -155,7 +154,6 @@ backendStdenv.mkDerivation rec { # libcrypt.so.1 libxcrypt-legacy ncurses6 - python39 python310 python311 ]; diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 4072c31dc296..b33dc33b5df8 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -309,14 +309,9 @@ stdenv.mkDerivation (finalAttrs: { ] ++ buildInputs; - prePatch = - optionalString stdenv.hostPlatform.isDarwin '' - substituteInPlace configure --replace-fail '`/usr/bin/arch`' '"i386"' - '' - + optionalString (pythonOlder "3.9" && stdenv.hostPlatform.isDarwin && x11Support) '' - # Broken on >= 3.9; replaced with ./3.9/darwin-tcl-tk.patch - substituteInPlace setup.py --replace-fail /Library/Frameworks /no-such-path - ''; + prePatch = optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace configure --replace-fail '`/usr/bin/arch`' '"i386"' + ''; patches = [ @@ -772,14 +767,6 @@ stdenv.mkDerivation (finalAttrs: { inherit src; name = "python${pythonVersion}-${version}-doc"; - patches = optionals (pythonAtLeast "3.9" && pythonOlder "3.10") [ - # https://github.com/python/cpython/issues/98366 - (fetchpatch { - url = "https://github.com/python/cpython/commit/5612471501b05518287ed61c1abcb9ed38c03942.patch"; - hash = "sha256-p41hJwAiyRgyVjCVQokMSpSFg/VDDrqkCSxsodVb6vY="; - }) - ]; - postPatch = lib.optionalString (pythonAtLeast "3.9" && pythonOlder "3.11") '' substituteInPlace Doc/tools/extensions/pyspecific.py \ --replace-fail "from sphinx.util import status_iterator" "from sphinx.util.display import status_iterator" diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index b16381009828..580f3db89968 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -44,18 +44,6 @@ inherit passthruFun; }; - python39 = callPackage ./cpython { - self = __splicedPackages.python39; - sourceVersion = { - major = "3"; - minor = "9"; - patch = "21"; - suffix = ""; - }; - hash = "sha256-MSb1lZLJsNeYWEdV8r97CB+hyjXOem/qmAEI11KgW7E="; - inherit passthruFun; - }; - python310 = callPackage ./cpython { self = __splicedPackages.python310; sourceVersion = { diff --git a/pkgs/development/python-modules/cx-freeze/default.nix b/pkgs/development/python-modules/cx-freeze/default.nix index cf81c2f5a2b5..6dfb7998bc2c 100644 --- a/pkgs/development/python-modules/cx-freeze/default.nix +++ b/pkgs/development/python-modules/cx-freeze/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { sed -i /patchelf/d pyproject.toml # Build system requirements substituteInPlace pyproject.toml \ - --replace-fail "setuptools>=70.1,<75" "setuptools" + --replace-fail "setuptools>=70.1,<76" "setuptools" ''; build-system = [ diff --git a/pkgs/games/crossfire/crossfire-server.nix b/pkgs/games/crossfire/crossfire-server.nix index 43d71aaede35..435d87beb547 100644 --- a/pkgs/games/crossfire/crossfire-server.nix +++ b/pkgs/games/crossfire/crossfire-server.nix @@ -9,7 +9,7 @@ perl, check, pkg-config, - python39, # crossfire-server relies on a parser wich was removed in python >3.9 + python3, version, rev, sha256, @@ -39,7 +39,7 @@ stdenv.mkDerivation { perl check pkg-config - python39 + python3 ]; hardeningDisable = [ "format" ]; @@ -49,13 +49,14 @@ stdenv.mkDerivation { sh autogen.sh ''; - configureFlags = [ "--with-python=${python39}" ]; + configureFlags = [ "--with-python=${python3}" ]; postInstall = '' ln -s ${maps} "$out/share/crossfire/maps" ''; meta = with lib; { + broken = true; # cfpython.c:63:10: fatal error: node.h: No such file or directory description = "Server for the Crossfire free MMORPG"; homepage = "http://crossfire.real-time.com/"; license = licenses.gpl2Plus; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c5a3c202b49..87b60aa85d4a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7589,12 +7589,6 @@ with pkgs; bluezSupport = lib.meta.availableOn stdenv.hostPlatform bluez; x11Support = true; }; - python39Full = python39.override { - self = python39Full; - pythonAttr = "python39Full"; - bluezSupport = lib.meta.availableOn stdenv.hostPlatform bluez; - x11Support = true; - }; python310Full = python310.override { self = python310Full; pythonAttr = "python310Full"; @@ -7639,7 +7633,6 @@ with pkgs; pythonInterpreters = callPackage ./../development/interpreters/python { }; inherit (pythonInterpreters) python27 - python39 python310 python311 python312 @@ -7655,7 +7648,6 @@ with pkgs; # Python package sets. python27Packages = python27.pkgs; - python39Packages = python39.pkgs; python310Packages = python310.pkgs; python311Packages = python311.pkgs; python312Packages = recurseIntoAttrs python312.pkgs; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 7f4ec006185d..d0721da803c3 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -38,14 +38,12 @@ mapAliases ({ python2Packages = throw "do not use python2Packages when building Python packages, specify each used package as a separate argument"; # do not remove python27Packages = throw "do not use python27Packages when building Python packages, specify each used package as a separate argument"; # do not remove python3Packages = throw "do not use python3Packages when building Python packages, specify each used package as a separate argument"; # do not remove - python39Packages = throw "do not use python39Packages when building Python packages, specify each used package as a separate argument"; # do not remove python310Packages = throw "do not use python310Packages when building Python packages, specify each used package as a separate argument"; # do not remove python311Packages = throw "do not use python311Packages when building Python packages, specify each used package as a separate argument"; # do not remove python312Packages = throw "do not use python312Packages when building Python packages, specify each used package as a separate argument"; # do not remove python313Packages = throw "do not use python313Packages when building Python packages, specify each used package as a separate argument"; # do not remove python2 = throw "do not use python2 when building Python packages, use the generic python parameter instead"; # do not remove python3 = throw "do not use python3 when building Python packages, use the generic python parameter instead"; # do not remove - python39 = throw "do not use python39 when building Python packages, use the generic python parameter instead"; # do not remove python310 = throw "do not use python310 when building Python packages, use the generic python parameter instead"; # do not remove python311 = throw "do not use python311 when building Python packages, use the generic python parameter instead"; # do not remove python312 = throw "do not use python312 when building Python packages, use the generic python parameter instead"; # do not remove