From 50f23da8e6249ab1be7a49922f5b38f9131d0b84 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 24 Sep 2018 14:32:50 +0200 Subject: [PATCH] python3Packages.py3exiv2: fix build Recent boost versions name their `python3` shared objects `boost_python3x` rather than `boost_python3`. See https://hydra.nixos.org/build/80712295 Addresses #45960 --- pkgs/development/python-modules/py3exiv2/default.nix | 9 +++++++-- pkgs/development/python-modules/py3exiv2/setup.patch | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index d8633488102be..4c6ca0bad3381 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -1,4 +1,4 @@ -{ buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx }: +{ buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx, substituteAll, python }: buildPythonPackage rec { pname = "py3exiv2"; @@ -16,7 +16,12 @@ buildPythonPackage rec { NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; # fix broken libboost_python3 detection - patches = [ ./setup.patch ]; + patches = [ + (substituteAll { + src = ./setup.patch; + version = "3${stdenv.lib.versions.minor python.version}"; + }) + ]; meta = { homepage = "https://launchpad.net/py3exiv2"; diff --git a/pkgs/development/python-modules/py3exiv2/setup.patch b/pkgs/development/python-modules/py3exiv2/setup.patch index bb4b115234794..8b0619c5bc5f6 100644 --- a/pkgs/development/python-modules/py3exiv2/setup.patch +++ b/pkgs/development/python-modules/py3exiv2/setup.patch @@ -5,7 +5,7 @@ return l.replace('libboost', 'boost') -libboost = get_libboost_name() -+libboost = 'boost_python3' ++libboost = 'boost_python@version@' setup( name='py3exiv2',