evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ma / masterpdfeditor / package.nix
blob34086ab5b9e543670efe2b5d14dffad6852f9793
1 { stdenv
2 , fetchurl
3 , sane-backends
4 , nss
5 , autoPatchelfHook
6 , lib
7 , libsForQt5
8 , pkcs11helper
9 }:
11 stdenv.mkDerivation rec {
12   pname = "masterpdfeditor";
13   version = "5.9.82";
15   src = fetchurl {
16     url = "https://code-industry.net/public/master-pdf-editor-${version}-qt5.x86_64.tar.gz";
17     hash = "sha256-CbrhhQJ0iiXz8hUJEi+/xb2ZGbunuPuIIgmCRgJhNVU=";
18   };
20   nativeBuildInputs = [
21     autoPatchelfHook
22     libsForQt5.wrapQtAppsHook
23   ];
25   buildInputs = with libsForQt5; [
26     nss
27     qtbase
28     qtsvg
29     sane-backends
30     stdenv.cc.cc
31     pkcs11helper
32   ];
34   dontStrip = true;
36   installPhase = ''
37     runHook preInstall
39     p=$out/opt/masterpdfeditor
40     mkdir -p $out/bin
42     substituteInPlace masterpdfeditor5.desktop \
43       --replace-fail 'Exec=/opt/master-pdf-editor-5' "Exec=$out/bin" \
44       --replace-fail 'Path=/opt/master-pdf-editor-5' "Path=$out/bin" \
45       --replace-fail 'Icon=/opt/master-pdf-editor-5' "Icon=$out/share/pixmaps"
47     install -Dm644 -t $out/share/pixmaps      masterpdfeditor5.png
48     install -Dm644 -t $out/share/applications masterpdfeditor5.desktop
49     install -Dm755 -t $p                      masterpdfeditor5
50     install -Dm644 license_en.txt $out/share/$name/LICENSE
51     ln -s $p/masterpdfeditor5 $out/bin/masterpdfeditor5
52     cp -v -r stamps templates lang fonts $p
54     runHook postInstall
55   '';
57   meta = with lib; {
58     description = "Master PDF Editor";
59     homepage = "https://code-industry.net/free-pdf-editor/";
60     sourceProvenance = with sourceTypes; [ binaryNativeCode ];
61     license = licenses.unfreeRedistributable;
62     platforms = [ "x86_64-linux" ];
63     maintainers = with maintainers; [ cmcdragonkai ];
64     mainProgram = "masterpdfeditor5";
65   };