From 78ffe122ce4d29464775e4979392edef8c906c6b Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Tue, 15 Apr 2025 18:13:49 -0400 Subject: [PATCH] python3Packages.py3exiv2: fix build on Darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The package’s `setup.py` assumes Boost is in `/usr/local/lib`, which is incorrect in nixpkgs. --- pkgs/development/python-modules/py3exiv2/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index 1cf6162cdb38b..c01eaaf57fead 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -20,6 +20,12 @@ buildPythonPackage rec { hash = "sha256-crI+X3YMRzPPmpGNsI2U+9bZgwcR0qTowJuPNFY/Ooo="; }; + # py3exiv2 only checks in `/usr/local/lib` for Boost, which is obviously wrong in nixpkgs. + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace setup.py \ + --replace-fail /usr/local/lib/ ${lib.escapeShellArg (lib.getLib boost)}/lib/ + ''; + buildInputs = [ boost exiv2 @@ -34,7 +40,6 @@ buildPythonPackage rec { doCheck = false; meta = with lib; { - broken = stdenv.hostPlatform.isDarwin; description = "Python binding to the library exiv2"; homepage = "https://launchpad.net/py3exiv2"; license = licenses.gpl3Plus;