3
0
Fork 0
forked from mirrors/nixpkgs

masterpdfeditor: 5.1.00 -> 5.1.12

This commit is contained in:
Peter Hoeg 2018-08-13 17:16:11 +08:00
parent 7478da5e84
commit 6afd19e699

View file

@ -1,11 +1,14 @@
{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook }: { stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook }:
let let
version = "5.1.00"; version = "5.1.12";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "masterpdfeditor-${version}"; name = "masterpdfeditor-${version}";
src = fetchurl { src = fetchurl {
url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz"; url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz";
sha256 = "1s2zhx9xr1ny5s8hmlb99v3z1v26vmx87iixk8cdgndz046p9bg9"; sha256 = "1i3pdrhnlj06phm36gs42s6b94pigcfb8wa5dhmplxn0dqp434hq";
}; };
nativeBuildInputs = [ autoPatchelfHook ]; nativeBuildInputs = [ autoPatchelfHook ];
@ -15,21 +18,24 @@ in stdenv.mkDerivation {
dontStrip = true; dontStrip = true;
installPhase = '' installPhase = ''
p=$out/opt/masterpdfeditor runHook preInstall
mkdir -p $out/bin $p $out/share/applications $out/share/pixmaps
substituteInPlace masterpdfeditor5.desktop \ p=$out/opt/masterpdfeditor
--replace 'Exec=/opt/master-pdf-editor-5' "Exec=$out/bin" \ mkdir -p $out/bin
--replace 'Path=/opt/master-pdf-editor-5' "Path=$out/bin" \
--replace 'Icon=/opt/master-pdf-editor-5' "Icon=$out/share/pixmaps"
cp -v masterpdfeditor5.png $out/share/pixmaps/
cp -v masterpdfeditor5.desktop $out/share/applications
cp -v masterpdfeditor5 $p/ substituteInPlace masterpdfeditor5.desktop \
ln -s $p/masterpdfeditor5 $out/bin/masterpdfeditor5 --replace 'Exec=/opt/master-pdf-editor-5' "Exec=$out/bin" \
cp -v -r stamps templates lang fonts $p --replace 'Path=/opt/master-pdf-editor-5' "Path=$out/bin" \
--replace 'Icon=/opt/master-pdf-editor-5' "Icon=$out/share/pixmaps"
install -D license.txt $out/share/$name/LICENSE install -Dm644 -t $out/share/pixmaps masterpdfeditor5.png
install -Dm644 -t $out/share/applications masterpdfeditor5.desktop
install -Dm755 -t $p masterpdfeditor5
install -Dm644 license.txt $out/share/$name/LICENSE
ln -s $p/masterpdfeditor5 $out/bin/masterpdfeditor5
cp -v -r stamps templates lang fonts $p
runHook postInstall
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {