at master 61 lines 1.6 kB view raw
1{ 2 stdenv, 3 fetchurl, 4 sane-backends, 5 qtbase, 6 qtsvg, 7 autoPatchelfHook, 8 lib, 9 wrapQtAppsHook, 10}: 11 12stdenv.mkDerivation rec { 13 pname = "masterpdfeditor4"; 14 version = "4.3.89"; 15 16 src = fetchurl { 17 url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz"; 18 sha256 = "0k5bzlhqglskiiq86nmy18mnh5bf2w3mr9cq3pibrwn5pisxnxxc"; 19 }; 20 21 nativeBuildInputs = [ 22 autoPatchelfHook 23 wrapQtAppsHook 24 ]; 25 26 buildInputs = [ 27 qtbase 28 qtsvg 29 sane-backends 30 stdenv.cc.cc 31 ]; 32 33 installPhase = '' 34 runHook preInstall 35 36 app_dir=$out/opt/masterpdfeditor4 37 mkdir -p $out/bin 38 39 substituteInPlace masterpdfeditor4.desktop \ 40 --replace 'Exec=/opt/master-pdf-editor-4' "Exec=$out/bin" \ 41 --replace 'Path=/opt/master-pdf-editor-4' "Path=$out/bin" \ 42 --replace 'Icon=/opt/master-pdf-editor-4' "Icon=$out/share/pixmaps" 43 44 install -Dm644 -t $out/share/pixmaps masterpdfeditor4.png 45 install -Dm644 -t $out/share/applications masterpdfeditor4.desktop 46 install -Dm755 -t $app_dir masterpdfeditor4 47 install -Dm644 license.txt $out/share/$name/LICENSE 48 ln -s $app_dir/masterpdfeditor4 $out/bin/masterpdfeditor4 49 cp -v -r stamps templates lang fonts $app_dir 50 51 runHook postInstall 52 ''; 53 54 meta = with lib; { 55 description = "Master PDF Editor - version 4, without watermark"; 56 homepage = "https://code-industry.net/free-pdf-editor/"; 57 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 58 license = licenses.unfreeRedistributable; 59 platforms = [ "x86_64-linux" ]; 60 }; 61}