Merge pull request #69101 from 1000101/pdfsam

pdfsam-basic: init at 4.0.4
This commit is contained in:
Marek Mahut 2019-09-19 20:43:19 +02:00 committed by GitHub
commit 8cc942d2ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,49 @@
{ stdenv, makeDesktopItem, fetchurl, jdk11, wrapGAppsHook, glib }:
stdenv.mkDerivation rec {
pname = "pdfsam-basic";
version = "4.0.4";
src = fetchurl {
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
sha256 = "17lhzxlgr4l4dljy0b0avfrgbj9rsfzk1dzg0abqvld4w4igkqbq";
};
unpackPhase = ''
ar vx ${src}
tar xvf data.tar.gz
'';
nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [ glib ];
preFixup = ''
gappsWrapperArgs+=(--set JAVA_HOME "${jdk11}" --set PDFSAM_JAVA_PATH "${jdk11}")
'';
installPhase = ''
cp -R opt/pdfsam-basic/ $out/
mkdir -p "$out"/share/icons
cp --recursive ${desktopItem}/share/applications $out/share
cp $out/icon.svg "$out"/share/icons/pdfsam-basic.svg
'';
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
icon = pname;
comment = meta.description;
desktopName = "PDFsam Basic";
genericName = "PDF Split and Merge";
mimeType = "application/pdf;";
categories = "Office;Application;";
};
meta = with stdenv.lib; {
homepage = "https://github.com/torakiki/pdfsam";
description = "Multi-platform software designed to extract pages, split, merge, mix and rotate PDF files";
license = licenses.agpl3;
platforms = platforms.all;
maintainers = with maintainers; [ maintainers."1000101" ];
};
}

View file

@ -19689,6 +19689,8 @@ in
pdfdiff = callPackage ../applications/misc/pdfdiff { };
pdfsam-basic = callPackage ../applications/misc/pdfsam-basic { };
mupdf = callPackage ../applications/misc/mupdf { };
mystem = callPackage ../applications/misc/mystem { };