From e6350e6df8e21aeb99c1abc96676a7a05d860a18 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Fri, 5 May 2023 10:02:37 +0300 Subject: [PATCH] Update poetry2nix override for `pillow` == 9.5.0 There is a bug in the `pillow` 9.5.0 release that breaks the build: https://github.com/nix-community/poetry2nix/issues/1139 https://github.com/python-pillow/Pillow/pull/7069 Apply the patch with the upstream fix when building version 9.5.0. The old override is still kept, even though the main part of that override was included in nix-community/poetry2nix#689 (the problem is that `buildInputs` in the poetry2nix override does not include all packages that are in the nixpkgs package for `pillow`, and therefore `preConfigure` might add references to nonexistent packages). --- shell.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell.nix b/shell.nix index 29a2bf1..007c00f 100644 --- a/shell.nix +++ b/shell.nix @@ -56,6 +56,14 @@ let propagatedBuildInputs = (old.buildInputs or []) ++ pkgs.python3.pkgs.pillow.propagatedBuildInputs; buildInputs = (old.buildInputs or []) ++ pkgs.python3.pkgs.pillow.buildInputs; preConfigure = (old.preConfigure or "") + pkgs.python3.pkgs.pillow.preConfigure; + + # https://github.com/nix-community/poetry2nix/issues/1139 + patches = (old.patches or []) ++ lib.optionals (old.version == "9.5.0") [ + (pkgs.fetchpatch { + url = "https://github.com/python-pillow/Pillow/commit/0ec0a89ead648793812e11739e2a5d70738c6be5.diff"; + sha256 = "sha256-rZfk+OXZU6xBpoumIW30E80gRsox/Goa3hMDxBUkTY0="; + }) + ]; }); qmk = super.qmk.overridePythonAttrs(old: { # Allow QMK CLI to run "qmk" as a subprocess (the wrapper changes