From 3c3ba95ecd37524fc471d5599562ab53a5f61540 Mon Sep 17 00:00:00 2001 From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:19:48 +0000 Subject: [PATCH] cuneiform: make install path match rpath; fix runtime --- pkgs/tools/graphics/cuneiform/default.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/graphics/cuneiform/default.nix b/pkgs/tools/graphics/cuneiform/default.nix index fa4cb75d174b..9332b25babfb 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"; }; -} +})