diff options
author | Theodore Ni <3806110+tjni@users.noreply.github.com> | 2023-08-18 16:02:27 -0700 |
---|---|---|
committer | Theodore Ni <3806110+tjni@users.noreply.github.com> | 2023-08-18 16:02:27 -0700 |
commit | ece0953571afe22091788a5e10bb6087b51fe653 (patch) | |
tree | 4d96b4f987589b45979e78c3708d61e29cc39858 /pkgs/tools/archivers | |
parent | 8e6c0c14a47046fb9424aaf9371ec743bcc0f9c2 (diff) | |
parent | 1949ef20809fcb8fc4bef910b2cbac9b0ca7fb9e (diff) |
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/tools/archivers')
-rw-r--r-- | pkgs/tools/archivers/peazip/default.nix | 98 | ||||
-rw-r--r-- | pkgs/tools/archivers/zip/default.nix | 1 |
2 files changed, 99 insertions, 0 deletions
diff --git a/pkgs/tools/archivers/peazip/default.nix b/pkgs/tools/archivers/peazip/default.nix new file mode 100644 index 0000000000000..3dd74e1e72989 --- /dev/null +++ b/pkgs/tools/archivers/peazip/default.nix @@ -0,0 +1,98 @@ +{ stdenv +, lib +, fetchFromGitHub +, wrapQtAppsHook +, fpc +, lazarus +, xorg +, libqt5pas +, _7zz +, archiver +, brotli +, upx +, zpaq +, zstd +}: + +stdenv.mkDerivation rec { + pname = "peazip"; + version = "9.9.0"; + + src = fetchFromGitHub { + owner = "peazip"; + repo = pname; + rev = version; + hash = "sha256-1UavigwVp/Gna2BOUECQrn/VQjov8wDw5EdPWX3mpvM="; + }; + sourceRoot = "${src.name}/peazip-sources"; + + nativeBuildInputs = [ + wrapQtAppsHook + lazarus + fpc + ]; + + buildInputs = [ + xorg.libX11 + libqt5pas + ]; + + NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}"; + + buildPhase = '' + export HOME=$(mktemp -d) + cd dev + lazbuild --lazarusdir=${lazarus}/share/lazarus --widgetset=qt5 --build-all project_pea.lpi && [ -f pea ] + lazbuild --lazarusdir=${lazarus}/share/lazarus --widgetset=qt5 --build-all project_peach.lpi && [ -f peazip ] + cd .. + ''; + + installPhase = '' + runHook preInstall + + # Executables + ## Main programs + install -D dev/{pea,peazip} -t $out/lib/peazip + mkdir -p $out/bin + ln -s $out/lib/peazip/{pea,peazip} $out/bin/ + + ## Symlink the available compression algorithm programs. + mkdir -p $out/lib/peazip/res/bin/7z + ln -s ${_7zz}/bin/7zz $out/lib/peazip/res/bin/7z/7z + mkdir -p $out/lib/peazip/res/bin/arc + ln -s ${archiver}/bin/arc $out/lib/peazip/res/bin/arc/ + mkdir -p $out/lib/peazip/res/bin/brotli + ln -s ${brotli}/bin/brotli $out/lib/peazip/res/bin/brotli/ + mkdir -p $out/lib/peazip/res/bin/upx + ln -s ${upx}/bin/upx $out/lib/peazip/res/bin/upx/ + mkdir -p $out/lib/peazip/res/bin/zpaq + ln -s ${zpaq}/bin/zpaq $out/lib/peazip/res/bin/zpaq/ + mkdir -p $out/lib/peazip/res/bin/zstd + ln -s ${zstd}/bin/zstd $out/lib/peazip/res/bin/zstd/ + + mkdir -p $out/share/peazip + ln -s $out/share/peazip $out/lib/peazip/res/share + cp -r res/share/{icons,lang,themes,presets} $out/share/peazip/ + install -D res/share/batch/freedesktop_integration/peazip.png -t "$out/share/icons/hicolor/256x256/apps" + install -D res/share/icons/peazip_{7z,rar,zip}.png -t "$out/share/icons/hicolor/256x256/mimetypes" + install -D res/share/batch/freedesktop_integration/peazip_{add,extract}.png -t "$out/share/icons/hicolor/256x256/actions" + install -D res/share/batch/freedesktop_integration/*.desktop -t "$out/share/applications" + + runHook postInstall + ''; + + meta = with lib; { + description = "Cross-platform file and archive manager"; + longDescription = '' + Free Zip / Unzip software and Rar file extractor. Cross-platform file and archive manager. + + Features volume spanning, compression, authenticated encryption. + + Supports 7Z, 7-Zip sfx, ACE, ARJ, Brotli, BZ2, CAB, CHM, CPIO, DEB, GZ, ISO, JAR, LHA/LZH, NSIS, OOo, PEA, RAR, RPM, split, TAR, Z, ZIP, ZIPX, Zstandard. + ''; + license = licenses.gpl3Only; + homepage = "https://peazip.github.io"; + platforms = platforms.linux; + maintainers = with maintainers; [ annaaurora ]; + }; +} diff --git a/pkgs/tools/archivers/zip/default.nix b/pkgs/tools/archivers/zip/default.nix index 75a7c81f3276c..1ac615a3d90ff 100644 --- a/pkgs/tools/archivers/zip/default.nix +++ b/pkgs/tools/archivers/zip/default.nix @@ -44,5 +44,6 @@ stdenv.mkDerivation rec { license = licenses.bsdOriginal; platforms = platforms.all; maintainers = [ ]; + mainProgram = "zip"; }; } |