pdfstudio: init at 2021.1.1
This commit is contained in:
parent
19790c4122
commit
edc46983fc
|
@ -13430,6 +13430,6 @@
|
||||||
name = "Philipp Woelfel";
|
name = "Philipp Woelfel";
|
||||||
email = "philipp.woelfel@gmail.com";
|
email = "philipp.woelfel@gmail.com";
|
||||||
github = "PhilippWoelfel";
|
github = "PhilippWoelfel";
|
||||||
githubID = 19400064;
|
githubId = 19400064;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,20 +12,20 @@
|
||||||
gnome2,
|
gnome2,
|
||||||
alsa-lib,
|
alsa-lib,
|
||||||
libgccjit,
|
libgccjit,
|
||||||
|
jdk11
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
year = "2021";
|
year = "2021";
|
||||||
rel = "1";
|
major = "1";
|
||||||
subrel = "1";
|
minor = "1";
|
||||||
in
|
in stdenv.mkDerivation rec {
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "pdfstudio";
|
pname = "pdfstudio";
|
||||||
version = "${year}.${rel}.${subrel}";
|
version = "${year}.${major}.${minor}";
|
||||||
autoPatchelfIgnoreMissingDeps=true;
|
autoPatchelfIgnoreMissingDeps = true;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.qoppa.com/${pname}/v${year}/PDFStudio_v${year}_${rel}_${subrel}_linux64.deb";
|
url = "https://download.qoppa.com/${pname}/v${year}/PDFStudio_v${year}_${major}_${minor}_linux64.deb";
|
||||||
sha256 = "089jfpbsxwjhx245g8svlmg213kny3z5nl6ra1flishnrsfjjcxb";
|
sha256 = "089jfpbsxwjhx245g8svlmg213kny3z5nl6ra1flishnrsfjjcxb";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,9 +41,10 @@ stdenv.mkDerivation rec {
|
||||||
makeWrapper
|
makeWrapper
|
||||||
dpkg
|
dpkg
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
|
jdk11 # only for unpacking .jar.pack files
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopItems = lib.singleton (makeDesktopItem {
|
desktopItems = [(makeDesktopItem {
|
||||||
name = "${pname}${year}";
|
name = "${pname}${year}";
|
||||||
desktopName = "PDF Studio";
|
desktopName = "PDF Studio";
|
||||||
genericName = "View and edit PDF files";
|
genericName = "View and edit PDF files";
|
||||||
|
@ -54,7 +55,7 @@ stdenv.mkDerivation rec {
|
||||||
categories = "Office";
|
categories = "Office";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
});
|
})];
|
||||||
|
|
||||||
unpackPhase = "dpkg-deb -x $src .";
|
unpackPhase = "dpkg-deb -x $src .";
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
@ -71,16 +72,13 @@ stdenv.mkDerivation rec {
|
||||||
ln -s $out/share/${pname}${year}/.install4j/${pname}${year}.png $out/share/pixmaps/
|
ln -s $out/share/${pname}${year}/.install4j/${pname}${year}.png $out/share/pixmaps/
|
||||||
makeWrapper $out/share/${pname}${year}/${pname}${year} $out/bin/${pname}
|
makeWrapper $out/share/${pname}${year}/${pname}${year} $out/bin/${pname}
|
||||||
|
|
||||||
runHook postInstall
|
#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
|
||||||
|
|
||||||
# We need to run pdfstudio once. This will unpack some jre.pack files in jre/lib.
|
runHook postInstall
|
||||||
# We must do this after autoPatchelfHook, so we'll do this in preInstallCheck.
|
|
||||||
# An alternative would beo to patchelf manually, using this (e.g., in the fixup phase):
|
|
||||||
# find $out/share/${pname}${year}/jre/bin -type f -executable -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
|
|
||||||
doInstallCheck = true;
|
|
||||||
preInstallCheck = ''
|
|
||||||
$out/share/${pname}${year}/${pname}${year}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue