about summary refs log tree commit diff
path: root/pkgs/development/embedded
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2023-02-14 02:16:17 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-02-19 15:52:13 +0100
commit9b5469bd507f9882db9fcc0302bd22d402a909e3 (patch)
treedbd8a62d8a1c7ca74bc9e6d067095c6ce8bf2a22 /pkgs/development/embedded
parent3cb4d0338d444c77a10c4ae15849ffc0f2867d1c (diff)
lattice-diamond: Add Diamond's library directories into RPATH
Subtools such as pnmainc rely on libraries in the diamond/bin/lin64 and
diamond/ispfpga/bin/lin64 directories, but they don't set LD_LIBRARY_PATH as
would be needed.

To make things work, simply include these two directories in the RPATH that is
patched into Diamond binaries.
Diffstat (limited to 'pkgs/development/embedded')
-rw-r--r--pkgs/development/embedded/fpga/lattice-diamond/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/embedded/fpga/lattice-diamond/default.nix b/pkgs/development/embedded/fpga/lattice-diamond/default.nix
index d27cf9bff3745..654e746ffa811 100644
--- a/pkgs/development/embedded/fpga/lattice-diamond/default.nix
+++ b/pkgs/development/embedded/fpga/lattice-diamond/default.nix
@@ -79,7 +79,8 @@ stdenv.mkDerivation {
             # dependencies from nix.
             patchelf \
                 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-                --set-rpath "$libPath" --force-rpath \
+                --set-rpath "$libPath:$out/$prefix/bin/lin64:$out/$prefix/ispfpga/bin/lin64" \
+                --force-rpath \
                 $f
         done
     done