2019-09-19 15:24:50 +01:00
|
|
|
{ stdenv, makeDesktopItem, fetchurl, jdk11, wrapGAppsHook, glib }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pdfsam-basic";
|
2020-11-26 15:49:47 +00:00
|
|
|
version = "4.2.1";
|
2019-09-19 15:24:50 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
|
2020-11-26 15:49:47 +00:00
|
|
|
sha256 = "0d7pvl87ybkvcxk69fr35fz0w447hy2pm65bhvlril16ljm2izja";
|
2019-09-19 15:24:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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;";
|
2020-06-25 03:18:37 +01:00
|
|
|
categories = "Office;";
|
2019-09-19 15:24:50 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2020-07-29 11:57:20 +01:00
|
|
|
maintainers = with maintainers; [ _1000101 ];
|
2019-09-19 15:24:50 +01:00
|
|
|
};
|
2020-06-25 03:18:37 +01:00
|
|
|
}
|