about summary refs log tree commit diff
path: root/pkgs/tools/graphics/cuneiform
diff options
context:
space:
mode:
authorannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2023-12-06 15:19:48 +0000
committerannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2023-12-06 15:19:48 +0000
commit3c3ba95ecd37524fc471d5599562ab53a5f61540 (patch)
tree9ffd9cadb021ea61f1174ad077d9267e1dc847c6 /pkgs/tools/graphics/cuneiform
parent09ec6a0881e1a36c29d67497693a67a16f4da573 (diff)
cuneiform: make install path match rpath; fix runtime
Diffstat (limited to 'pkgs/tools/graphics/cuneiform')
-rw-r--r--pkgs/tools/graphics/cuneiform/default.nix19
1 files changed, 16 insertions, 3 deletions
diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix
index fa4cb75d174b3..9332b25babfb1 100644
--- a/pkgs/tools/graphics/cuneiform/default.nix
+++ b/pkgs/tools/graphics/cuneiform/default.nix
@@ -1,6 +1,6 @@
-{ lib, stdenv, fetchurl, cmake, imagemagick }:
+{ lib, stdenv, fetchurl, cmake, imagemagick, testers }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation (finalAttrs: {
   pname = "cuneiform";
   version = "1.1.0";
 
@@ -30,10 +30,23 @@ stdenv.mkDerivation {
     rm cuneiform_src/Kern/hhh/tigerh/h/strings.h
   '';
 
+  # make the install path match the rpath
+  postInstall = ''
+    if [[ -d ''${!outputLib}/lib64 ]]; then
+      mv ''${!outputLib}/lib64 ''${!outputLib}/lib
+      ln -s lib ''${!outputLib}/lib64
+    fi
+  '';
+
   buildInputs = [ imagemagick ];
 
   nativeBuildInputs = [ cmake ];
 
+  passthru.tests = testers.testVersion {
+    package = finalAttrs.finalPackage;
+    command = "cuneiform";
+  };
+
   meta = with lib; {
     description = "Multi-language OCR system";
     homepage = "https://launchpad.net/cuneiform-linux";
@@ -42,4 +55,4 @@ stdenv.mkDerivation {
     maintainers = [ maintainers.raskin ];
     mainProgram = "cuneiform";
   };
-}
+})