summary refs log tree commit diff
path: root/pkgs/applications/science/logic/isabelle
diff options
context:
space:
mode:
author1000teslas <47207223+1000teslas@users.noreply.github.com>2022-01-11 19:22:30 +1100
committer1000teslas <47207223+1000teslas@users.noreply.github.com>2022-01-11 21:09:27 +1100
commita4b6785de97e0f0524281647671cee7ce23a911c (patch)
tree8d681cda85ba7473bf64d2b4be763d68a497798f /pkgs/applications/science/logic/isabelle
parentd9d30199ec6d8b0a12b9e7d77c019e0fcac96f66 (diff)
downloadnixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.tar
nixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.tar.gz
nixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.tar.bz2
nixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.tar.lz
nixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.tar.xz
nixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.tar.zst
nixpkgs-a4b6785de97e0f0524281647671cee7ce23a911c.zip
isabelle: patch jni libs for nitpick
Diffstat (limited to 'pkgs/applications/science/logic/isabelle')
-rw-r--r--pkgs/applications/science/logic/isabelle/default.nix31
1 files changed, 19 insertions, 12 deletions
diff --git a/pkgs/applications/science/logic/isabelle/default.nix b/pkgs/applications/science/logic/isabelle/default.nix
index 419293c9bbb..5427f42a758 100644
--- a/pkgs/applications/science/logic/isabelle/default.nix
+++ b/pkgs/applications/science/logic/isabelle/default.nix
@@ -7,18 +7,22 @@ stdenv.mkDerivation rec {
 
   dirname = "Isabelle${version}";
 
-  src = if stdenv.isDarwin
-    then fetchurl {
-      url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_macos.tar.gz";
-      sha256 = "0n1ls9vwf0ps1x8zpb7c1xz1wkasgvc34h5bz280hy2z6iqwmwbc";
-    }
-    else fetchurl {
-      url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
-      sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i";
-    };
+  src =
+    if stdenv.isDarwin
+    then
+      fetchurl
+        {
+          url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_macos.tar.gz";
+          sha256 = "0n1ls9vwf0ps1x8zpb7c1xz1wkasgvc34h5bz280hy2z6iqwmwbc";
+        }
+    else
+      fetchurl {
+        url = "https://isabelle.in.tum.de/website-${dirname}/dist/${dirname}_linux.tar.gz";
+        sha256 = "0jfaqckhg388jh9b4msrpkv6wrd6xzlw18m0bngbby8k8ywalp9i";
+      };
 
   buildInputs = [ polyml z3 veriT vampire eprover-ho ]
-             ++ lib.optionals (!stdenv.isDarwin) [ nettools java ];
+    ++ lib.optionals (!stdenv.isDarwin) [ nettools java ];
 
   sourceRoot = dirname;
 
@@ -69,12 +73,15 @@ stdenv.mkDerivation rec {
     for comp in contrib/jdk* contrib/polyml-* contrib/z3-* contrib/verit-* contrib/vampire-* contrib/e-*; do
       rm -rf $comp/x86*
     done
-    '' + (if ! stdenv.isLinux then "" else ''
+  '' + (if ! stdenv.isLinux then "" else ''
     arch=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64-linux" else "x86-linux"}
     for f in contrib/*/$arch/{bash_process,epclextract,nunchaku,SPASS,zipperposition}; do
       patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f"
     done
-    '');
+    for d in contrib/kodkodi-*/jni/$arch; do
+      patchelf --set-rpath "${lib.concatStringsSep ":" [ "${java}/lib/openjdk/lib/server" "${stdenv.cc.cc.lib}/lib" ]}" $d/*.so
+    done
+  '');
 
   installPhase = ''
     mkdir -p $out/bin