1 { stdenv, fetchurl, sane-backends, qtbase, qtsvg, nss, autoPatchelfHook, lib, wrapQtAppsHook }:
3 stdenv.mkDerivation rec {
4 pname = "masterpdfeditor";
8 url = "https://code-industry.net/public/master-pdf-editor-${version}-qt5.x86_64.tar.gz";
9 sha256 = "sha256-c5DYS0PQemZ8Sql2KjnuMspCLDJzU95rsbuIdoxWDM0=";
12 nativeBuildInputs = [ autoPatchelfHook wrapQtAppsHook ];
14 buildInputs = [ nss qtbase qtsvg sane-backends stdenv.cc.cc ];
21 p=$out/opt/masterpdfeditor
24 substituteInPlace masterpdfeditor5.desktop \
25 --replace 'Exec=/opt/master-pdf-editor-5' "Exec=$out/bin" \
26 --replace 'Path=/opt/master-pdf-editor-5' "Path=$out/bin" \
27 --replace 'Icon=/opt/master-pdf-editor-5' "Icon=$out/share/pixmaps"
29 install -Dm644 -t $out/share/pixmaps masterpdfeditor5.png
30 install -Dm644 -t $out/share/applications masterpdfeditor5.desktop
31 install -Dm755 -t $p masterpdfeditor5
32 install -Dm644 license.txt $out/share/$name/LICENSE
33 ln -s $p/masterpdfeditor5 $out/bin/masterpdfeditor5
34 cp -v -r stamps templates lang fonts $p
40 description = "Master PDF Editor";
41 homepage = "https://code-industry.net/free-pdf-editor/";
42 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
43 license = licenses.unfreeRedistributable;
44 platforms = [ "x86_64-linux" ];
45 maintainers = with maintainers; [ cmcdragonkai ];