Commit 086fa76f authored by Robert Schütz's avatar Robert Schütz
Browse files

jbig2enc: don't install Python 2 script

Also set meta.mainProgram.
parent b1f18e30
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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";
  };
}