jbig2enc: don't install Python 2 script

Also set meta.mainProgram.
This commit is contained in:
Robert Schütz 2023-09-28 09:40:38 -07:00
parent b1f18e30c9
commit 086fa76f16

View file

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, fetchpatch
, python3
, leptonica
, zlib
, libwebp
@ -24,6 +25,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ autoreconfHook ];
propagatedBuildInputs = [
leptonica
zlib
@ -42,6 +44,11 @@ stdenv.mkDerivation rec {
})
];
# We don't want to install this Python 2 script
postInstall = ''
rm "$out/bin/pdf.py"
'';
# This is necessary, because the resulting library has
# /tmp/nix-build-jbig2enc/src/.libs before /nix/store/jbig2enc/lib
# in its rpath, which means that patchelf --shrink-rpath removes
@ -56,5 +63,6 @@ stdenv.mkDerivation rec {
license = lib.licenses.asl20;
platforms = lib.platforms.all;
homepage = "https://github.com/agl/jbig2enc";
mainProgram = "jbig2";
};
}