1 { stdenv, fetchurl, sane-backends, qtbase, qtsvg, autoPatchelfHook, lib, wrapQtAppsHook }:
3 stdenv.mkDerivation rec {
4 pname = "masterpdfeditor4";
8 url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz";
9 sha256 = "0k5bzlhqglskiiq86nmy18mnh5bf2w3mr9cq3pibrwn5pisxnxxc";
12 nativeBuildInputs = [ autoPatchelfHook wrapQtAppsHook ];
14 buildInputs = [ qtbase qtsvg sane-backends stdenv.cc.cc ];
19 app_dir=$out/opt/masterpdfeditor4
22 substituteInPlace masterpdfeditor4.desktop \
23 --replace 'Exec=/opt/master-pdf-editor-4' "Exec=$out/bin" \
24 --replace 'Path=/opt/master-pdf-editor-4' "Path=$out/bin" \
25 --replace 'Icon=/opt/master-pdf-editor-4' "Icon=$out/share/pixmaps"
27 install -Dm644 -t $out/share/pixmaps masterpdfeditor4.png
28 install -Dm644 -t $out/share/applications masterpdfeditor4.desktop
29 install -Dm755 -t $app_dir masterpdfeditor4
30 install -Dm644 license.txt $out/share/$name/LICENSE
31 ln -s $app_dir/masterpdfeditor4 $out/bin/masterpdfeditor4
32 cp -v -r stamps templates lang fonts $app_dir
38 description = "Master PDF Editor - version 4, without watermark";
39 homepage = "https://code-industry.net/free-pdf-editor/";
40 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
41 license = licenses.unfreeRedistributable;
42 platforms = [ "x86_64-linux" ];