torrent7z: init at 1.3

torrent7z: apply suggestions from code review

Co-authored-by: legendofmiracles <30902201+legendofmiracles@users.noreply.github.com>

+55
+53
pkgs/tools/archivers/torrent7z/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, ncurses }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "torrent7z"; 5 + version = "1.3"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "BubblesInTheTub"; 9 + repo = pname; 10 + rev = version; 11 + sha256 = "Y2tr0+z9uij4Ifi6FfWRN24BwcDXUZKVLkLtKUiVjU4="; 12 + }; 13 + 14 + patches = [ 15 + (fetchpatch { 16 + name = "fix-gcc10-compilation.patch"; # Fix compilation on GCC 10. This patch is included on the latest commit 17 + url = 18 + "https://github.com/paulyc/torrent7z/commit/5958f42a364c430b3ed4ac68911bbbea1f967fc4.patch"; 19 + sha256 = "vJOv1sG9XwTvvxQiWew0H5ALoUb9wIAouzTsTvKHuPI="; 20 + }) 21 + ]; 22 + 23 + buildInputs = [ ncurses ]; 24 + 25 + hardeningDisable = [ "format" ]; 26 + 27 + postPatch = '' 28 + # Remove non-free RAR source code 29 + # (see DOC/License.txt, https://fedoraproject.org/wiki/Licensing:Unrar) 30 + rm -r linux_src/p7zip_4.65/CPP/7zip/Compress/Rar* 31 + find . -name makefile'*' -exec sed -i '/Rar/d' {} + 32 + ''; 33 + 34 + preConfigure = '' 35 + mkdir linux_src/p7zip_4.65/bin 36 + cd linux_src/p7zip_4.65/CPP/7zip/Bundles/Alone 37 + ''; 38 + 39 + installPhase = '' 40 + mkdir -p $out/bin 41 + cp ../../../../bin/t7z $out/bin 42 + ''; 43 + 44 + meta = with lib; { 45 + homepage = "https://github.com/BubblesInTheTub/torrent7z"; 46 + description = "A fork of torrent7z, viz a derivative of 7zip that produces invariant .7z archives for torrenting"; 47 + platforms = platforms.linux; 48 + maintainers = with maintainers; [ cirno-999 ]; 49 + mainProgram = "t7z"; 50 + # RAR code is under non-free UnRAR license, but we remove it 51 + license = licenses.gpl3Only; 52 + }; 53 + }
+2
pkgs/top-level/all-packages.nix
··· 10264 10264 10265 10265 touchegg = callPackage ../tools/inputmethods/touchegg { }; 10266 10266 10267 + torrent7z = callPackage ../tools/archivers/torrent7z { }; 10268 + 10267 10269 torsocks = callPackage ../tools/security/tor/torsocks.nix { }; 10268 10270 10269 10271 toss = callPackage ../tools/networking/toss { };