2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, makeDesktopItem, fetchurl, jdk11, wrapGAppsHook, glib }:
|
2019-09-19 14:24:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pdfsam-basic";
|
2022-01-31 16:32:31 +00:00
|
|
|
version = "4.2.12";
|
2019-09-19 14:24:50 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
|
2022-01-31 16:32:31 +00:00
|
|
|
sha256 = "sha256-B9V3dw5A52yPoNfROI3+wAql+Y0hY4T3sTm9uN70TQQ=";
|
2019-09-19 14:24:50 +00: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";
|
2022-02-22 14:56:15 +00:00
|
|
|
mimeTypes = [ "application/pdf" ];
|
|
|
|
categories = [ "Office" ];
|
2019-09-19 14:24:50 +00:00
|
|
|
};
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-19 14:24:50 +00:00
|
|
|
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 10:57:20 +00:00
|
|
|
maintainers = with maintainers; [ _1000101 ];
|
2019-09-19 14:24:50 +00:00
|
|
|
};
|
2020-06-25 02:18:37 +00:00
|
|
|
}
|