mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
Merge pull request #151287 from PhilippWoelfel/submit/pdfstudio-init
pdfstudio: init at 2021.1.1
This commit is contained in:
commit
ddbdf98a33
@ -13426,4 +13426,10 @@
|
||||
github = "jpagex";
|
||||
githubId = 635768;
|
||||
};
|
||||
pwoelfel = {
|
||||
name = "Philipp Woelfel";
|
||||
email = "philipp.woelfel@gmail.com";
|
||||
github = "PhilippWoelfel";
|
||||
githubId = 19400064;
|
||||
};
|
||||
}
|
||||
|
91
pkgs/applications/misc/pdfstudio/default.nix
Normal file
91
pkgs/applications/misc/pdfstudio/default.nix
Normal file
@ -0,0 +1,91 @@
|
||||
{ stdenv,
|
||||
lib,
|
||||
makeWrapper,
|
||||
fetchurl,
|
||||
dpkg,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
autoPatchelfHook,
|
||||
gst_all_1,
|
||||
sane-backends,
|
||||
xorg,
|
||||
gnome2,
|
||||
alsa-lib,
|
||||
libgccjit,
|
||||
jdk11
|
||||
}:
|
||||
|
||||
let
|
||||
year = "2021";
|
||||
major = "1";
|
||||
minor = "1";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "pdfstudio";
|
||||
version = "${year}.${major}.${minor}";
|
||||
autoPatchelfIgnoreMissingDeps = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.qoppa.com/${pname}/v${year}/PDFStudio_v${year}_${major}_${minor}_linux64.deb";
|
||||
sha256 = "089jfpbsxwjhx245g8svlmg213kny3z5nl6ra1flishnrsfjjcxb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gst_all_1.gst-libav
|
||||
sane-backends
|
||||
xorg.libXxf86vm
|
||||
xorg.libXtst
|
||||
gnome2.libgtkhtml
|
||||
alsa-lib
|
||||
libgccjit
|
||||
autoPatchelfHook
|
||||
makeWrapper
|
||||
dpkg
|
||||
copyDesktopItems
|
||||
jdk11 # only for unpacking .jar.pack files
|
||||
];
|
||||
|
||||
desktopItems = [(makeDesktopItem {
|
||||
name = "${pname}${year}";
|
||||
desktopName = "PDF Studio";
|
||||
genericName = "View and edit PDF files";
|
||||
exec = "${pname} %f";
|
||||
icon = "${pname}${year}";
|
||||
comment = "Views and edits PDF files";
|
||||
mimeType = "application/pdf";
|
||||
categories = "Office";
|
||||
type = "Application";
|
||||
terminal = false;
|
||||
})];
|
||||
|
||||
unpackPhase = "dpkg-deb -x $src .";
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share
|
||||
mkdir -p $out/share/applications
|
||||
mkdir -p $out/share/pixmaps
|
||||
cp -r opt/${pname}${year} $out/share/
|
||||
ln -s $out/share/${pname}${year}/.install4j/${pname}${year}.png $out/share/pixmaps/
|
||||
makeWrapper $out/share/${pname}${year}/${pname}${year} $out/bin/${pname}
|
||||
|
||||
#Unpack jar files. Otherwise pdfstudio does this and fails due to read-only FS.
|
||||
for pfile in $out/share/${pname}${year}/jre/lib/{,ext/}*.jar.pack; do
|
||||
jar_file=`echo "$pfile" | awk '{ print substr($0,1,length($0)-5) }'`
|
||||
unpack200 -r "$pfile" "$jar_file"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.qoppa.com/pdfstudio/";
|
||||
description = "An easy to use, full-featured PDF editing software";
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.pwoelfel ];
|
||||
};
|
||||
}
|
@ -24099,6 +24099,8 @@ with pkgs;
|
||||
|
||||
foxitreader = libsForQt512.callPackage ../applications/misc/foxitreader { };
|
||||
|
||||
pdfstudio = callPackage ../applications/misc/pdfstudio { };
|
||||
|
||||
aeolus = callPackage ../applications/audio/aeolus { };
|
||||
|
||||
aewan = callPackage ../applications/editors/aewan { };
|
||||
|
Loading…
Reference in New Issue
Block a user