1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Fix optional gtk-mac-integration

This commit is contained in:
Pallav Agarwal 2018-02-15 13:14:40 +05:30
parent b484164017
commit c0fcdb5484
4 changed files with 5 additions and 4 deletions

View file

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
patches = [ ./gtkflags.patch ];
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}'
string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}'
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)

View file

@ -15,10 +15,11 @@ stdenv.mkDerivation rec {
buildInputs = [
zathura_core gtk girara openssl mupdf libjpeg jbig2dec openjpeg
] ++ stdenv.lib.optional stdenv.isDarwin [
gtk-mac-integration
];
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}'
string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}'
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)

View file

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}'
string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}'
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)

View file

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
patches = [ ./gtkflags.patch ];
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)
makefileC2=$(echo "$makefileC1" | sed 's|-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}|-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}|g' )
echo "$makefileC2" > Makefile