Unverified Commit 208645bf authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

python39: drop (#397258)

parents 43aad2d1 f3621952
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ sets are

* `pkgs.python27Packages`
* `pkgs.python3Packages`
* `pkgs.python39Packages`
* `pkgs.python310Packages`
* `pkgs.python311Packages`
* `pkgs.python312Packages`
+3 −3
Original line number Diff line number Diff line
@@ -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.";
}
```
+17 −35
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  fetchPypi,
  replaceVars,
  python39,
  python3,
  fluidsynth,
  soundfont-fluid,
  wrapGAppsHook3,
@@ -12,59 +11,42 @@
  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=";
  };

  patches = [
    (replaceVars ./hardcoded-paths.patch {
      fluidsynth = "${fluidsynth}/lib/libfluidsynth.so";
      soundfont = "${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2";
      ghostscript = "${ghostscript}/bin/gs";
    })
  ];

  nativeBuildInputs = [ wrapGAppsHook3 ];

  propagatedBuildInputs = with python.pkgs; [
  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;
  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";
      soundfont = "${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2";
      ghostscript = "${ghostscript}/bin/gs";
    })
  ];

  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"

+3 −3
Original line number Diff line number Diff line
@@ -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;
  };
}
+1 −2
Original line number Diff line number Diff line
@@ -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
Loading