nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 44 lines 1.5 kB view raw
1{ stdenv, fetchurl, sane-backends, qtbase, qtsvg, autoPatchelfHook, lib, wrapQtAppsHook }: 2 3stdenv.mkDerivation rec { 4 pname = "masterpdfeditor4"; 5 version = "4.3.89"; 6 7 src = fetchurl { 8 url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz"; 9 sha256 = "0k5bzlhqglskiiq86nmy18mnh5bf2w3mr9cq3pibrwn5pisxnxxc"; 10 }; 11 12 nativeBuildInputs = [ autoPatchelfHook wrapQtAppsHook ]; 13 14 buildInputs = [ qtbase qtsvg sane-backends stdenv.cc.cc ]; 15 16 installPhase = '' 17 runHook preInstall 18 19 app_dir=$out/opt/masterpdfeditor4 20 mkdir -p $out/bin 21 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" 26 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 33 34 runHook postInstall 35 ''; 36 37 meta = with lib; { 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" ]; 43 }; 44}