From de2afd359d9bd0c2f8a9ff56dc7a3c579a8d1024 Mon Sep 17 00:00:00 2001 From: regnat Date: Mon, 3 May 2021 16:47:05 +0200 Subject: [PATCH] openjfx: Fix for CA derivations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Manipulating the store paths on the Nix side doesn’t work with CA derivations (because these paths are just placeholders of the form `/{hash}` at eval-time) --- pkgs/development/compilers/openjdk/openjfx/15.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/openjdk/openjfx/15.nix b/pkgs/development/compilers/openjdk/openjfx/15.nix index 655b29f6535d..e5da2bc3fe05 100644 --- a/pkgs/development/compilers/openjdk/openjfx/15.nix +++ b/pkgs/development/compilers/openjdk/openjfx/15.nix @@ -95,8 +95,9 @@ in makePackage { postFixup = '' # Remove references to bootstrap. + export openjdkOutPath='${openjdk11_headless.outPath}' find "$out" -name \*.so | while read lib; do - new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${lib.escape ["+"] openjdk11_headless.outPath}[^:]*,,')" + new_refs="$(patchelf --print-rpath "$lib" | perl -pe 's,:?\Q$ENV{openjdkOutPath}\E[^:]*,,')" patchelf --set-rpath "$new_refs" "$lib" done '';