masterpdfeditor: use autoPatchelfHook
This commit is contained in:
parent
fd29514404
commit
ee9d0a85d9
@ -1,52 +1,42 @@
|
|||||||
{ stdenv, fetchurl, glibc, sane-backends, qtbase, qtsvg, libXext, libX11, libXdmcp, libXau, libxcb }:
|
{ stdenv, fetchurl, glibc, sane-backends, qtbase, qtsvg, libXext, libX11, libXdmcp, libXau, libxcb, autoPatchelfHook }:
|
||||||
let
|
let
|
||||||
version = "4.3.89";
|
version = "4.3.89";
|
||||||
in
|
in stdenv.mkDerivation {
|
||||||
stdenv.mkDerivation {
|
name = "masterpdfeditor-${version}";
|
||||||
name = "masterpdfeditor-${version}";
|
src = fetchurl {
|
||||||
src = fetchurl {
|
url = "http://get.code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz";
|
||||||
url = "http://get.code-industry.net/public/master-pdf-editor-${version}_qt5.amd64.tar.gz";
|
sha256 = "0k5bzlhqglskiiq86nmy18mnh5bf2w3mr9cq3pibrwn5pisxnxxc";
|
||||||
sha256 = "0k5bzlhqglskiiq86nmy18mnh5bf2w3mr9cq3pibrwn5pisxnxxc";
|
};
|
||||||
};
|
|
||||||
libPath = stdenv.lib.makeLibraryPath [
|
|
||||||
stdenv.cc.cc
|
|
||||||
glibc
|
|
||||||
sane-backends
|
|
||||||
qtbase
|
|
||||||
qtsvg
|
|
||||||
libXext
|
|
||||||
libX11
|
|
||||||
libXdmcp
|
|
||||||
libXau
|
|
||||||
libxcb
|
|
||||||
];
|
|
||||||
dontStrip = true;
|
|
||||||
installPhase = ''
|
|
||||||
p=$out/opt/masterpdfeditor
|
|
||||||
mkdir -p $out/bin $p $out/share/applications $out/share/pixmaps
|
|
||||||
|
|
||||||
substituteInPlace masterpdfeditor4.desktop \
|
nativeBuildInputs = [ autoPatchelfHook ];
|
||||||
--replace 'Exec=/opt/master-pdf-editor-4' "Exec=$out/bin" \
|
|
||||||
--replace 'Path=/opt/master-pdf-editor-4' "Path=$out/bin" \
|
|
||||||
--replace 'Icon=/opt/master-pdf-editor-4' "Icon=$out/share/pixmaps"
|
|
||||||
cp -v masterpdfeditor4.png $out/share/pixmaps/
|
|
||||||
cp -v masterpdfeditor4.desktop $out/share/applications
|
|
||||||
|
|
||||||
cp -v masterpdfeditor4 $p/
|
buildInputs = [ sane-backends qtbase qtsvg ];
|
||||||
ln -s $p/masterpdfeditor4 $out/bin/masterpdfeditor4
|
|
||||||
cp -v -r stamps templates lang fonts $p
|
|
||||||
|
|
||||||
install -D license.txt $out/share/$name/LICENSE
|
dontStrip = true;
|
||||||
|
|
||||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
installPhase = ''
|
||||||
--set-rpath $libPath \
|
p=$out/opt/masterpdfeditor
|
||||||
$p/masterpdfeditor4
|
mkdir -p $out/bin $p $out/share/applications $out/share/pixmaps
|
||||||
'';
|
|
||||||
meta = with stdenv.lib; {
|
substituteInPlace masterpdfeditor4.desktop \
|
||||||
description = "Master PDF Editor";
|
--replace 'Exec=/opt/master-pdf-editor-4' "Exec=$out/bin" \
|
||||||
homepage = "https://code-industry.net/free-pdf-editor/";
|
--replace 'Path=/opt/master-pdf-editor-4' "Path=$out/bin" \
|
||||||
license = licenses.unfreeRedistributable;
|
--replace 'Icon=/opt/master-pdf-editor-4' "Icon=$out/share/pixmaps"
|
||||||
platforms = with platforms; [ "x86_64-linux" ];
|
cp -v masterpdfeditor4.png $out/share/pixmaps/
|
||||||
maintainers = with maintainers; [ cmcdragonkai flokli ];
|
cp -v masterpdfeditor4.desktop $out/share/applications
|
||||||
};
|
|
||||||
}
|
cp -v masterpdfeditor4 $p/
|
||||||
|
ln -s $p/masterpdfeditor4 $out/bin/masterpdfeditor4
|
||||||
|
cp -v -r stamps templates lang fonts $p
|
||||||
|
|
||||||
|
install -D license.txt $out/share/$name/LICENSE
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Master PDF Editor";
|
||||||
|
homepage = "https://code-industry.net/free-pdf-editor/";
|
||||||
|
license = licenses.unfreeRedistributable;
|
||||||
|
platforms = with platforms; [ "x86_64-linux" ];
|
||||||
|
maintainers = with maintainers; [ cmcdragonkai flokli ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user