From a571edecd089758c365f49803f851e46d3dcefb0 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 1 Dec 2016 19:52:16 +0100 Subject: [PATCH] haskell-jni: fix path to missing libjvm libjvm.so is in a non-standard location and the build needs help finding it. Closes https://github.com/NixOS/nixpkgs/issues/20669. --- pkgs/development/haskell-modules/configuration-common.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 22416389040c..766f7f793b5b 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -76,6 +76,14 @@ self: super: { ''; }); + # jni needs help finding libjvm.so because it's in a weird location. + jni = overrideCabal super.jni (drv: { + preConfigure = '' + local libdir=( "${pkgs.jdk}/lib/openjdk/jre/lib/"*"/server" ) + configureFlags+=" --extra-lib-dir=''${libdir[0]}" + ''; + }); + # The package doesn't know about the AL include hierarchy. # https://github.com/phaazon/al/issues/1 al = appendConfigureFlag super.al "--extra-include-dirs=${pkgs.openal}/include/AL";