From 1f8f89d309eeebfe00b25c30cc9dca103f3d8b47 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 18 Jun 2018 18:41:17 -0400 Subject: inkscape: work around ARGMAX limit This uses strictDeps to get our args passed to the linker low enough to enable building inkscape. With strictDeps we need to correctly use nativeBuildInputs to avoid an issue. --- pkgs/applications/graphics/inkscape/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pkgs/applications/graphics/inkscape') diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 7eb9e7aa00165..0d01a6313585c 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -17,6 +17,12 @@ stdenv.mkDerivation rec { sha256 = "1chng2yw8dsjxc9gf92aqv7plj11cav8ax321wmakmv5bb09cch6"; }; + # Inkscape hits the ARGMAX when linking on macOS. It appears to be + # CMake’s ARGMAX check doesn’t offer enough padding for NIX_LDFLAGS. + # Setting strictDeps it avoids duplicating some dependencies so it + # will leave us under ARGMAX. + strictDeps = true; + unpackPhase = '' cp $src ${name}.tar.bz2 tar xvjf ${name}.tar.bz2 > /dev/null @@ -33,19 +39,19 @@ stdenv.mkDerivation rec { --replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"' ''; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig cmake makeWrapper python2Env ]; buildInputs = [ perl perlXMLParser libXft libpng zlib popt boehmgc libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext - makeWrapper gsl poppler imagemagick libwpg librevenge - libvisio libcdr libexif potrace cmake python2Env + gsl poppler imagemagick libwpg librevenge + libvisio libcdr libexif potrace ]; enableParallelBuilding = true; postInstall = '' # Make sure PyXML modules can be found at run-time. - rm "$out/share/icons/hicolor/icon-theme.cache" + rm -f "$out/share/icons/hicolor/icon-theme.cache" '' + stdenv.lib.optionalString stdenv.isDarwin '' install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkscape install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkview -- cgit 1.4.1