diff --git a/pkgs/by-name/fr/freetype/package.nix b/pkgs/by-name/fr/freetype/package.nix index 2f5f6ccef0a8..460e787f59a6 100644 --- a/pkgs/by-name/fr/freetype/package.nix +++ b/pkgs/by-name/fr/freetype/package.nix @@ -42,14 +42,10 @@ stdenv.mkDerivation (finalAttrs: { pname = "freetype"; version = "2.14.3"; - src = - let - inherit (finalAttrs) pname version; - in - fetchurl { - url = "mirror://savannah/freetype/freetype-${version}.tar.xz"; - sha256 = "sha256-NrxPHMQTM1No7mVsQq/KZcWjmH6HaMwozxG6d154Wl8="; - }; + src = fetchurl { + url = "mirror://savannah/freetype/freetype-${finalAttrs.version}.tar.xz"; + hash = "sha256-NrxPHMQTM1No7mVsQq/KZcWjmH6HaMwozxG6d154Wl8="; + }; propagatedBuildInputs = [ zlib diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 2311afef7a39..eed032805c76 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -19,13 +19,8 @@ # native libraries ffmpeg-headless, freetype, - # By default, almost all tests fail due to the fact we use our version of - # freetype. We still use this argument to define the overridden - # derivation `matplotlib.passthru.tests.withoutOutdatedFreetype` - which - # builds matplotlib with the freetype version they default to, with which all - # tests should pass. - doCheck ? false, qhull, + libraqm, # propagates contourpy, @@ -75,14 +70,14 @@ let interactive = enableTk || enableGtk3 || enableQt; in -buildPythonPackage rec { - version = "3.10.9"; +buildPythonPackage (finalAttrs: { + version = "3.11.0"; pname = "matplotlib"; pyproject = true; src = fetchPypi { - inherit pname version; - hash = "sha256-/WZQjoxod9mOWGZUtgigRW241+ilRuseJgDv2VcwI1g="; + inherit (finalAttrs) pname version; + hash = "sha256-aMDHvgGzDcyjY4k09/WR33NAEjXL2/DRqxxx59t/i1c="; }; env.XDG_RUNTIME_DIR = "/tmp"; @@ -99,10 +94,6 @@ buildPythonPackage rec { --replace-fail "/usr/bin/env python3" "/usr/bin/env pypy3" '' + '' - substituteInPlace pyproject.toml \ - --replace-fail "meson-python>=0.13.1,<0.17.0" meson-python \ - --replace-fail "setuptools_scm>=7,<10" setuptools_scm - patchShebangs tools '' + lib.optionalString (stdenv.hostPlatform.isLinux && interactive) '' @@ -118,6 +109,7 @@ buildPythonPackage rec { ffmpeg-headless freetype qhull + libraqm ] ++ lib.optionals enableGtk3 [ cairo @@ -159,6 +151,7 @@ buildPythonPackage rec { mesonFlags = lib.mapAttrsToList lib.mesonBool { system-freetype = true; system-qhull = true; + system-libraqm = true; # Otherwise GNU's `ar` binary fails to put symbols from libagg into the # matplotlib shared objects. See: # -https://github.com/matplotlib/matplotlib/issues/28260#issuecomment-2146243663 @@ -168,20 +161,14 @@ buildPythonPackage rec { passthru.tests = { inherit sage; - withOutdatedFreetype = matplotlib.override { - doCheck = true; - freetype = freetype.overrideAttrs (_: { - src = fetchurl { - url = "mirror://savannah/freetype/freetype-old/freetype-2.6.1.tar.gz"; - hash = "sha256-Cjx9+9ptoej84pIy6OltmHq6u79x68jHVlnkEyw2cBQ="; - }; - patches = [ ]; - }); - }; }; pythonImportsCheck = [ "matplotlib" ]; - inherit doCheck; + # Running the tests requires a specific freetype version, so pixel-to-pixel + # comparisons will pass. Since matplotlib depends directly & indirectly on + # freetype, this would be too expensive to even test this (correctly) in + # `passthru.tests`. + doCheck = false; nativeCheckInputs = [ pytestCheckHook ]; preCheck = '' # https://matplotlib.org/devdocs/devel/testing.html#obtain-the-reference-images @@ -199,13 +186,14 @@ buildPythonPackage rec { meta = { description = "Python plotting library, making publication quality plots"; homepage = "https://matplotlib.org/"; - changelog = "https://github.com/matplotlib/matplotlib/releases/tag/v${version}"; + changelog = "https://github.com/matplotlib/matplotlib/releases/tag/v${finalAttrs.version}"; license = with lib.licenses; [ psfl bsd0 ]; maintainers = with lib.maintainers; [ veprbl + doronbehar ]; }; -} +})