From 6bae07337e038a1b2b874de1ea3f7a121b9d89b8 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Sat, 16 Mar 2019 21:37:11 +1100 Subject: [PATCH] Remove libfreetype.so from adoptopenjdk's derivation. This caused some reverse dependencies of adoptopenjdk to depend on adoptopenjdk's libfreetype, rather than the NixOS libfreetype. For example: https://github.com/NixOS/nixpkgs/issues/57733 Now the derivation does not contain libfreetype.so . The JRE links to nixpkg's freetype: $ ldd /nix/store/9iyxm1nkn35xhjgri041r980z4p5ls5g-adoptopenjdk-hotspot-bin-11.0.2/lib/libfontmanager.so | grep -i freetype libfreetype.so => /nix/store/ycbkq39cngzx19j829qzgdnw3mx3z78g-freetype-2.9.1/lib/libfreetype.so (0x0000795e30702000) --- .../development/compilers/adoptopenjdk-bin/jdk-linux-base.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index 6e3fe6c4ebf1..8e8b157aa229 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -72,6 +72,10 @@ let result = stdenv.mkDerivation rec { # Remove some broken manpages. rm -rf $out/man/ja* + # Remove embedded freetype to avoid problems like + # https://github.com/NixOS/nixpkgs/issues/57733 + rm $out/lib/libfreetype.so + # for backward compatibility ln -s $out $out/jre