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

cuneiform: make install path match rpath; fix runtime
This commit is contained in:
7c6f434c 2023-12-06 20:06:49 +00:00 committed by GitHub
commit e4e2af6d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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