summary refs log tree commit diff
path: root/pkgs/tools/graphics/cuneiform/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics/cuneiform/default.nix')
-rw-r--r--pkgs/tools/graphics/cuneiform/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix
index 0e5131b603d0..232b6c5464a9 100644
--- a/pkgs/tools/graphics/cuneiform/default.nix
+++ b/pkgs/tools/graphics/cuneiform/default.nix
@@ -28,8 +28,10 @@ rec {
     cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=$out -DDL_LIB=${libc}/lib
   '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"];
       
+  needLib64 = a.stdenv.system == "x86_64-linux";
+
   postInstall = a.fullDepEntry(''
-    patchelf --set-rpath $out/lib${if a.stdenv.gcc.gcc != null then ":${a.stdenv.gcc.gcc}/lib" else ""}:${a.imagemagick}/lib $out/bin/cuneiform
+    patchelf --set-rpath $out/lib${if needLib64 then "64" else ""}${if a.stdenv.gcc.gcc != null then ":${a.stdenv.gcc.gcc}/lib" else ""}${if a.stdenv.gcc.gcc != null && needLib64 then ":${a.stdenv.gcc.gcc}/lib64" else ""}:${a.imagemagick}/lib $out/bin/cuneiform
   '') ["minInit" "addInputs" "doMakeInstall"];
 
   name = "cuneiform-" + version;