From c03c5c1500a34897650b4297934f07b9cd8863ba Mon Sep 17 00:00:00 2001 From: Sebastián Mancilla Date: Sat, 22 Jan 2022 18:41:49 -0300 Subject: shogun: fix CMake targets CMake uses the directory of the configuration files to calculate the path to the installed library and headers. But now that shogun uses multiple outputs, this results in the $dev output being used for the location of the shared library instead of $out. Path the targets file to use the right location for the shared library. --- pkgs/applications/science/machine-learning/shogun/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/applications') diff --git a/pkgs/applications/science/machine-learning/shogun/default.nix b/pkgs/applications/science/machine-learning/shogun/default.nix index fc57d8ec5c5..b715c2fc33b 100644 --- a/pkgs/applications/science/machine-learning/shogun/default.nix +++ b/pkgs/applications/science/machine-learning/shogun/default.nix @@ -177,6 +177,12 @@ stdenv.mkDerivation rec { rm -r $out/share ''; + postFixup = '' + # CMake incorrectly calculates library path from dev prefix + substituteInPlace $dev/lib/cmake/shogun/ShogunTargets-release.cmake \ + --replace "\''${_IMPORT_PREFIX}/lib/" "$out/lib/" + ''; + meta = with lib; { description = "A toolbox which offers a wide range of efficient and unified machine learning methods"; homepage = "http://shogun-toolbox.org/"; -- cgit 1.4.1