From e8a336b154c09bc139f689843d81c1d554a9ae9f Mon Sep 17 00:00:00 2001 From: Alexei Boronine Date: Fri, 23 Feb 2018 03:20:03 +0100 Subject: [PATCH 1/2] perlPackages.TextBibTex: fix dylib path for Darwin --- pkgs/top-level/perl-packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index ed13a00b6fc7..c1e29bb7f438 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -14573,6 +14573,15 @@ let self = _self // overrides; _self = with self; { sha256 = "0dig1zlglm8rwm8fhnz087lx6gixj9jx10kxn1fx3swdkfblhsmf"; }; perlPreHook = "export LD=$CC"; + perlPostHook = stdenv.lib.optionalString stdenv.isDarwin '' + oldPath="$(pwd)/btparse/src/libbtparse.dylib" + newPath="$out/lib/libbtparse.dylib" + + install_name_tool -id "$newPath" "$newPath" + install_name_tool -change "$oldPath" "$newPath" "$out/bin/biblex" + install_name_tool -change "$oldPath" "$newPath" "$out/bin/bibparse" + install_name_tool -change "$oldPath" "$newPath" "$out/bin/dumpnames" + ''; meta = { description = "Interface to read and parse BibTeX files"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; From cafcd6e9f4442011da2dc35f6be5cbbd0868455d Mon Sep 17 00:00:00 2001 From: Alexei Boronine Date: Sat, 24 Feb 2018 03:46:09 +0100 Subject: [PATCH 2/2] perlPackages.TextBibTeX: also patch .bundle file --- pkgs/top-level/perl-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index c1e29bb7f438..5b2b8f26eb9b 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -14581,6 +14581,7 @@ let self = _self // overrides; _self = with self; { install_name_tool -change "$oldPath" "$newPath" "$out/bin/biblex" install_name_tool -change "$oldPath" "$newPath" "$out/bin/bibparse" install_name_tool -change "$oldPath" "$newPath" "$out/bin/dumpnames" + install_name_tool -change "$oldPath" "$newPath" "$out/lib/perl5/site_perl/5.24.3/darwin-2level/auto/Text/BibTeX/BibTeX.bundle" ''; meta = { description = "Interface to read and parse BibTeX files";