Skip to content

Commit

Permalink
Merge pull request NixOS#272491 from a-n-n-a-l-e-e/cuneiform
Browse files Browse the repository at this point in the history
cuneiform: make install path match rpath; fix runtime
  • Loading branch information
7c6f434c authored Dec 6, 2023
2 parents 849da51 + 3c3ba95 commit e4e2af6
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions pkgs/tools/graphics/cuneiform/default.nix
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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";
Expand All @@ -42,4 +55,4 @@ stdenv.mkDerivation {
maintainers = [ maintainers.raskin ];
mainProgram = "cuneiform";
};
}
})

0 comments on commit e4e2af6

Please sign in to comment.