mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
60 lines
1.6 KiB
Nix
60 lines
1.6 KiB
Nix
{
|
|
stdenv,
|
|
fetchurl,
|
|
sane-backends,
|
|
autoPatchelfHook,
|
|
lib,
|
|
libsForQt5,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "masterpdfeditor4";
|
|
version = "4.3.89";
|
|
|
|
src = fetchurl {
|
|
url = "https://code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz";
|
|
sha256 = "0k5bzlhqglskiiq86nmy18mnh5bf2w3mr9cq3pibrwn5pisxnxxc";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
autoPatchelfHook
|
|
libsForQt5.wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
libsForQt5.qtbase
|
|
libsForQt5.qtsvg
|
|
sane-backends
|
|
stdenv.cc.cc
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
app_dir=$out/opt/masterpdfeditor4
|
|
mkdir -p $out/bin
|
|
|
|
substituteInPlace masterpdfeditor4.desktop \
|
|
--replace-fail 'Exec=/opt/master-pdf-editor-4/' "Exec=" \
|
|
--replace-fail 'Path=/opt/master-pdf-editor-4' "" \
|
|
--replace-fail 'Icon=/opt/master-pdf-editor-4/masterpdfeditor4.png' "Icon=masterpdfeditor4"
|
|
|
|
install -Dm644 -t $out/share/icons/hicolor/128x128/apps masterpdfeditor4.png
|
|
install -Dm644 -t $out/share/applications masterpdfeditor4.desktop
|
|
install -Dm755 -t $app_dir masterpdfeditor4
|
|
install -Dm644 license.txt $out/share/$name/LICENSE
|
|
ln -s $app_dir/masterpdfeditor4 $out/bin/masterpdfeditor4
|
|
cp -v -r stamps templates lang fonts $app_dir
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Master PDF Editor - version 4, without watermark";
|
|
homepage = "https://code-industry.net/free-pdf-editor/";
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
license = lib.licenses.unfreeRedistributable;
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|