summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorSebastián Mancilla <smancill@smancill.dev>2022-01-22 18:41:49 -0300
committerSebastián Mancilla <smancill@smancill.dev>2022-01-22 18:41:49 -0300
commitc03c5c1500a34897650b4297934f07b9cd8863ba (patch)
treec664641257235495b7bdcfb9774a829bad3899cd /pkgs/applications
parentaaea9844c65f01b6ad605a1d80e2e6cfae4d5352 (diff)
downloadnixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.tar
nixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.tar.gz
nixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.tar.bz2
nixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.tar.lz
nixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.tar.xz
nixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.tar.zst
nixpkgs-c03c5c1500a34897650b4297934f07b9cd8863ba.zip
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.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/science/machine-learning/shogun/default.nix6
1 files changed, 6 insertions, 0 deletions
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/";