Merge pull request #118769 from p-h/add-foxitreader

authored by

Sandro and committed by
GitHub
186151f3 c8eefd17

+87
+6
maintainers/maintainer-list.nix
··· 7535 githubId = 3438604; 7536 name = "Petter Storvik"; 7537 }; 7538 philandstuff = { 7539 email = "philip.g.potter@gmail.com"; 7540 github = "philandstuff";
··· 7535 githubId = 3438604; 7536 name = "Petter Storvik"; 7537 }; 7538 + p-h = { 7539 + email = "p@hurlimann.org"; 7540 + github = "p-h"; 7541 + githubId = 645664; 7542 + name = "Philippe Hürlimann"; 7543 + }; 7544 philandstuff = { 7545 email = "philip.g.potter@gmail.com"; 7546 github = "philandstuff";
+79
pkgs/applications/misc/foxitreader/default.nix
···
··· 1 + { mkDerivation, lib, fetchzip, libarchive, autoPatchelfHook, libsecret, libGL, zlib, openssl, qtbase, qtwebkit, qtxmlpatterns }: 2 + 3 + mkDerivation rec { 4 + pname = "foxitreader"; 5 + version = "2.4.4.0911"; 6 + 7 + src = fetchzip { 8 + url = "https://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/${lib.versions.major version}.x/${lib.versions.majorMinor version}/en_us/FoxitReader.enu.setup.${version}.x64.run.tar.gz"; 9 + sha256 = "0ff4xs9ipc7sswq0czfhpsd7qw7niw0zsf9wgsqhbbgzcpbdhcb7"; 10 + stripRoot = false; 11 + }; 12 + 13 + buildInputs = [ libGL libsecret openssl qtbase qtwebkit qtxmlpatterns zlib ]; 14 + 15 + nativeBuildInputs = [ autoPatchelfHook libarchive ]; 16 + 17 + buildPhase = '' 18 + runHook preBuild 19 + 20 + input_file=$src/*.run 21 + mkdir -p extracted 22 + # Look for all 7z files and extract them 23 + grep --only-matching --byte-offset --binary \ 24 + --text -P '7z\xBC\xAF\x27\x1C\x00\x03' $input_file | cut -d: -f1 | 25 + while read position; do 26 + tail -c +$(($position + 1)) $input_file > file.7z 27 + bsdtar xf file.7z -C extracted 28 + done 29 + 30 + runHook postBuild 31 + ''; 32 + 33 + installPhase = '' 34 + runHook preInstall 35 + 36 + mkdir -p $out/lib 37 + cd extracted 38 + 39 + cp -r \ 40 + CollectStrategy.txt \ 41 + cpdf_settings \ 42 + fxplugins \ 43 + lang \ 44 + resource \ 45 + run \ 46 + stamps \ 47 + welcome \ 48 + Wrappers \ 49 + $out/lib/ 50 + 51 + patchelf $out/lib/fxplugins/librms.so \ 52 + --replace-needed libssl.so.10 libssl.so \ 53 + --replace-needed libcrypto.so.10 libcrypto.so 54 + 55 + # FIXME: Doing this with one invocation is broken right now 56 + patchelf $out/lib/fxplugins/librmscrypto.so \ 57 + --replace-needed libssl.so.10 libssl.so 58 + patchelf $out/lib/fxplugins/librmscrypto.so \ 59 + --replace-needed libcrypto.so.10 libcrypto.so 60 + 61 + install -D -m 755 FoxitReader -t $out/bin 62 + 63 + # Install icon and desktop files 64 + install -D -m 644 images/FoxitReader.png -t $out/share/pixmaps/ 65 + install -D -m 644 FoxitReader.desktop -t $out/share/applications/ 66 + echo Exec=FoxitReader %F >> $out/share/applications/FoxitReader.desktop 67 + 68 + runHook postInstall 69 + ''; 70 + 71 + qtWrapperArgs = [ "--set appname FoxitReader" "--set selfpath $out/lib" ]; 72 + 73 + meta = with lib; { 74 + description = "A viewer for PDF documents"; 75 + homepage = "https://www.foxitsoftware.com/"; 76 + license = licenses.unfree; 77 + maintainers = with maintainers; [ p-h rhoriguchi ]; 78 + }; 79 + }
+2
pkgs/top-level/all-packages.nix
··· 21753 21754 masterpdfeditor4 = libsForQt5.callPackage ../applications/misc/masterpdfeditor4 { }; 21755 21756 aeolus = callPackage ../applications/audio/aeolus { }; 21757 21758 aewan = callPackage ../applications/editors/aewan { };
··· 21753 21754 masterpdfeditor4 = libsForQt5.callPackage ../applications/misc/masterpdfeditor4 { }; 21755 21756 + foxitreader = libsForQt512.callPackage ../applications/misc/foxitreader { }; 21757 + 21758 aeolus = callPackage ../applications/audio/aeolus { }; 21759 21760 aewan = callPackage ../applications/editors/aewan { };