1 { lib, stdenv, makeDesktopItem, fetchurl, jdk19, wrapGAppsHook, glib }:
3 stdenv.mkDerivation rec {
4 pname = "pdfsam-basic";
8 url = "https://github.com/torakiki/pdfsam/releases/download/v${version}/pdfsam_${version}-1_amd64.deb";
9 hash = "sha256-NST5d5dzO26ifKStbgD7qNbumUMQhfUFNE472LR1z5k=";
17 nativeBuildInputs = [ wrapGAppsHook ];
18 buildInputs = [ glib ];
21 gappsWrapperArgs+=(--set JAVA_HOME "${jdk19}" --set PDFSAM_JAVA_PATH "${jdk19}")
25 cp -R opt/pdfsam-basic/ $out/
26 mkdir -p "$out"/share/icons
27 cp --recursive ${desktopItem}/share/applications $out/share
28 cp $out/icon.svg "$out"/share/icons/pdfsam-basic.svg
31 desktopItem = makeDesktopItem {
35 comment = meta.description;
36 desktopName = "PDFsam Basic";
37 genericName = "PDF Split and Merge";
38 mimeTypes = [ "application/pdf" ];
39 categories = [ "Office" ];
43 homepage = "https://github.com/torakiki/pdfsam";
44 description = "Multi-platform software designed to extract pages, split, merge, mix and rotate PDF files";
45 sourceProvenance = with sourceTypes; [
49 license = licenses.agpl3Plus;
50 platforms = platforms.linux;
51 maintainers = with maintainers; [ _1000101 ];