cuneiform: make install path match rpath; fix runtime

This commit is contained in:
annalee 2023-12-06 15:19:48 +00:00
parent 09ec6a0881
commit 3c3ba95ecd
No known key found for this signature in database

View File

@ -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";
};
}
})