Merge pull request #272491 from a-n-n-a-l-e-e/cuneiform

cuneiform: make install path match rpath; fix runtime

authored by 7c6f434c and committed by GitHub e4e2af6d 849da515

+16 -3
+16 -3
pkgs/tools/graphics/cuneiform/default.nix
··· 1 - { lib, stdenv, fetchurl, cmake, imagemagick }: 2 3 - stdenv.mkDerivation { 4 pname = "cuneiform"; 5 version = "1.1.0"; 6 ··· 30 rm cuneiform_src/Kern/hhh/tigerh/h/strings.h 31 ''; 32 33 buildInputs = [ imagemagick ]; 34 35 nativeBuildInputs = [ cmake ]; 36 37 meta = with lib; { 38 description = "Multi-language OCR system"; 39 homepage = "https://launchpad.net/cuneiform-linux"; ··· 42 maintainers = [ maintainers.raskin ]; 43 mainProgram = "cuneiform"; 44 }; 45 - }
··· 1 + { lib, stdenv, fetchurl, cmake, imagemagick, testers }: 2 3 + stdenv.mkDerivation (finalAttrs: { 4 pname = "cuneiform"; 5 version = "1.1.0"; 6 ··· 30 rm cuneiform_src/Kern/hhh/tigerh/h/strings.h 31 ''; 32 33 + # make the install path match the rpath 34 + postInstall = '' 35 + if [[ -d ''${!outputLib}/lib64 ]]; then 36 + mv ''${!outputLib}/lib64 ''${!outputLib}/lib 37 + ln -s lib ''${!outputLib}/lib64 38 + fi 39 + ''; 40 + 41 buildInputs = [ imagemagick ]; 42 43 nativeBuildInputs = [ cmake ]; 44 45 + passthru.tests = testers.testVersion { 46 + package = finalAttrs.finalPackage; 47 + command = "cuneiform"; 48 + }; 49 + 50 meta = with lib; { 51 description = "Multi-language OCR system"; 52 homepage = "https://launchpad.net/cuneiform-linux"; ··· 55 maintainers = [ maintainers.raskin ]; 56 mainProgram = "cuneiform"; 57 }; 58 + })