@@ -8,14 +8,13 @@ let
88 { self
99 , drv
1010 , attr
11− , extraAttrs ? [ ]
1211 }:
1312 let
1413 buildSystem = if attr == "cython" then self.python.pythonForBuild.pkgs.cython else self.${attr};
1514 in
1615 (
1716 # Flit only works on Python3
18− if (attr == "flit-core" || attr == "flit" || attr == "hatchling") && !self.isPy3k then drv
17+ if (attr == "flit-core" || attr == "flit") && !self.isPy3k then drv
1918 else
2019 drv.overridePythonAttrs (
2120 old:
@@ -24,7 +23,7 @@ let
2423 { }
2524 else
2625 {
27− nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.${attr} ] ++ map (a: self.${a}) extraAttrs;
26+ nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.${attr} ];
2827 }
2928 )
3029 );
@@ -56,16 +55,6 @@ lib.composeManyExtensions [
5655 systems)
5756 buildSystems)
5857
59− # Build systems with conditionals
60− (self: super: {
61−
62− platformdirs =
63− if lib.versionAtLeast super.platformdirs.version "2.5.2"
64− then addBuildSystem { inherit self; drv = super.platformdirs; attr = "hatchling"; extraAttrs = [ "hatch-vcs" ]; }
65− else super.platformdirs;
66−
67− })
68−
6958 # Build fixes
7059 (self: super:
7160 let
@@ -448,17 +437,6 @@ lib.composeManyExtensions [
448437 }
449438 );
450439
451− # Setuptools >= 60 broke build_py_2to3
452− docutils =
453− if lib.versionOlder super.docutils.version "0.16" && lib.versionAtLeast super.setuptools.version "60" then
454− (
455− super.docutils.overridePythonAttrs (
456− old: {
457− SETUPTOOLS_USE_DISTUTILS = "stdlib";
458− }
459− )
460− ) else super.docutils;
461−
462440 # Environment markers are not always included (depending on how a dep was defined)
463441 enum34 = if self.pythonAtLeast "3.4" then null else super.enum34;
464442
@@ -866,17 +844,6 @@ lib.composeManyExtensions [
866844 }
867845 );
868846
869− lsassy =
870− if super.lsassy.version == "3.1.1" then
871− super.lsassy.overridePythonAttrs
872− (old: {
873− # pyproject.toml contains a constraint `rich = "^10.6.0"` which is not replicated in setup.py
874− # hence pypi misses it and poetry pins rich to 11.0.0
875− preConfigure = (old.preConfigure or "") + ''
876− rm pyproject.toml
877− '';
878− }) else super.lsassy;
879−
880847 lxml = super.lxml.overridePythonAttrs (
881848 old: {
882849 nativeBuildInputs = with pkgs.buildPackages; (old.nativeBuildInputs or [ ]) ++ [ pkg-config libxml2.dev libxslt.dev ] ++ lib.optionals stdenv.isDarwin [ xcodebuild ];
@@ -1176,26 +1143,6 @@ lib.composeManyExtensions [
11761143 }
11771144 );
11781145
1179− orjson =
1180− let
1181− getCargoHash = version: {
1182− "3.6.7" = "sha256-sz2k9podPB6QSptkyOu7+BoVTrKhefizRtYU+MICPt4=";
1183− "3.6.8" = "sha256-vpfceVtYkU09xszNIihY1xbqGWieqDquxwsAmDH8jd4=";
1184− }.${version} or null;
1185− in
1186− super.orjson.overridePythonAttrs (old: {
1187− cargoDeps = pkgs.rustPlatform.fetchCargoTarball {
1188− inherit (old) src;
1189− name = "${old.pname}-${old.version}";
1190− hash = getCargoHash old.version;
1191− };
1192− nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
1193− pkgs.rustPlatform.cargoSetupHook
1194− pkgs.rustPlatform.maturinBuildHook
1195− ];
1196− buildInputs = (old.buildInputs or [ ]) ++ lib.optional pkgs.stdenv.isDarwin pkgs.libiconv;
1197− });
1198−
11991146 osqp = super.osqp.overridePythonAttrs (
12001147 old: {
12011148 nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.cmake ];
@@ -1203,29 +1150,6 @@ lib.composeManyExtensions [
12031150 }
12041151 );
12051152
1206−
1207− pandas = super.pandas.overridePythonAttrs (old: {
1208−
1209− buildInputs = old.buildInputs or [ ] ++ lib.optional stdenv.isDarwin pkgs.libcxx;
1210−
1211− # Doesn't work with -Werror,-Wunused-command-line-argument
1212− # https://github.com/NixOS/nixpkgs/issues/39687
1213− hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow";
1214−
1215− # For OSX, we need to add a dependency on libcxx, which provides
1216− # `complex.h` and other libraries that pandas depends on to build.
1217− postPatch = lib.optionalString stdenv.isDarwin ''
1218− cpp_sdk="${lib.getDev pkgs.libcxx}/include/c++/v1";
1219− echo "Adding $cpp_sdk to the setup.py common_include variable"
1220− substituteInPlace setup.py \
1221− --replace "['pandas/src/klib', 'pandas/src']" \
1222− "['pandas/src/klib', 'pandas/src', '$cpp_sdk']"
1223− '';
1224−
1225−
1226− enableParallelBuilding = true;
1227− });
1228−
12291153 pantalaimon = super.pantalaimon.overridePythonAttrs (old: {
12301154 nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.installShellFiles ];
12311155 postInstall = old.postInstall or "" + ''
@@ -1272,12 +1196,8 @@ lib.composeManyExtensions [
12721196
12731197 pillow = super.pillow.overridePythonAttrs (
12741198 old: {
1275− nativeBuildInputs = (old.nativeBuildInputs or [ ])
1276− ++ [ pkg-config self.pytest-runner ];
1277− buildInputs = with pkgs; (old.buildInputs or [ ])
1278− ++ [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ]
1279− ++ lib.optionals (lib.versionAtLeast old.version "7.1.0") [ xorg.libxcb ]
1280− ++ lib.optionals (self.isPyPy) [ tk xorg.libX11 ];
1199+ nativeBuildInputs = [ pkg-config self.pytest-runner ] ++ (old.nativeBuildInputs or [ ]);
1200+ buildInputs = with pkgs; [ freetype libjpeg zlib libtiff libwebp tcl lcms2 ] ++ (old.buildInputs or [ ]);
12811201 }
12821202 );
12831203
@@ -1326,14 +1246,6 @@ lib.composeManyExtensions [
13261246 }
13271247 );
13281248
1329− psycopg2cffi = super.psycopg2cffi.overridePythonAttrs (
1330− old: {
1331− buildInputs = (old.buildInputs or [ ])
1332− ++ lib.optional stdenv.isDarwin pkgs.openssl;
1333− nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.postgresql ];
1334− }
1335− );
1336−
13371249 py-solc-x = super.py-solc-x.overridePythonAttrs (
13381250 old: {
13391251 preConfigure = ''
@@ -1948,12 +1860,6 @@ lib.composeManyExtensions [
19481860
19491861 });
19501862
1951− soundfile = super.soundfile.overridePythonAttrs (old: {
1952− postPatch = ''
1953− substituteInPlace soundfile.py --replace "_find_library('sndfile')" "'${pkgs.libsndfile.out}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}'"
1954− '';
1955− });
1956−
19571863 systemd-python = super.systemd-python.overridePythonAttrs (old: {
19581864 buildInputs = old.buildInputs ++ [ pkgs.systemd ];
19591865 nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.pkg-config ];