2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, makeDesktopItem, fetchurl, jdk21, wrapGAppsHook, glib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pdfsam-basic";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Q1387Su6bmBkXvcrTgWtYZb9z/pKHiOTfUkUNHN8ItY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
ar vx ${src}
|
|
|
|
tar xvf data.tar.gz
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook ];
|
|
|
|
buildInputs = [ glib ];
|
|
|
|
|
|
|
|
preFixup = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
gappsWrapperArgs+=(--set JAVA_HOME "${jdk21}" --set PDFSAM_JAVA_PATH "${jdk21}")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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-03-05 16:20:37 +00:00
|
|
|
mimeTypes = [ "application/pdf" ];
|
|
|
|
categories = [ "Office" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-02-09 11:40:11 +00:00
|
|
|
homepage = "https://github.com/torakiki/pdfsam";
|
|
|
|
description = "Multi-platform software designed to extract pages, split, merge, mix and rotate PDF files";
|
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
binaryBytecode
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ _1000101 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-07-18 16:06:22 +00:00
|
|
|
}
|