diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f49f2d92e489..8d8975a2e8a1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2140,6 +2140,12 @@ githubId = 3956062; name = "Simon Lackerbauer"; }; + cirno-999 = { + email = "reverene@protonmail.com"; + github = "cirno-999"; + githubId = 73712874; + name = "cirno-999"; + }; citadelcore = { email = "alex@arctarus.co.uk"; github = "citadelcore"; diff --git a/pkgs/tools/archivers/torrent7z/default.nix b/pkgs/tools/archivers/torrent7z/default.nix new file mode 100644 index 000000000000..74eaa4409f75 --- /dev/null +++ b/pkgs/tools/archivers/torrent7z/default.nix @@ -0,0 +1,53 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses }: + +stdenv.mkDerivation rec { + pname = "torrent7z"; + version = "1.3"; + + src = fetchFromGitHub { + owner = "BubblesInTheTub"; + repo = pname; + rev = version; + sha256 = "Y2tr0+z9uij4Ifi6FfWRN24BwcDXUZKVLkLtKUiVjU4="; + }; + + patches = [ + (fetchpatch { + name = "fix-gcc10-compilation.patch"; # Fix compilation on GCC 10. This patch is included on the latest commit + url = + "https://github.com/paulyc/torrent7z/commit/5958f42a364c430b3ed4ac68911bbbea1f967fc4.patch"; + sha256 = "vJOv1sG9XwTvvxQiWew0H5ALoUb9wIAouzTsTvKHuPI="; + }) + ]; + + buildInputs = [ ncurses ]; + + hardeningDisable = [ "format" ]; + + postPatch = '' + # Remove non-free RAR source code + # (see DOC/License.txt, https://fedoraproject.org/wiki/Licensing:Unrar) + rm -r linux_src/p7zip_4.65/CPP/7zip/Compress/Rar* + find . -name makefile'*' -exec sed -i '/Rar/d' {} + + ''; + + preConfigure = '' + mkdir linux_src/p7zip_4.65/bin + cd linux_src/p7zip_4.65/CPP/7zip/Bundles/Alone + ''; + + installPhase = '' + mkdir -p $out/bin + cp ../../../../bin/t7z $out/bin + ''; + + meta = with lib; { + homepage = "https://github.com/BubblesInTheTub/torrent7z"; + description = "A fork of torrent7z, viz a derivative of 7zip that produces invariant .7z archives for torrenting"; + platforms = platforms.linux; + maintainers = with maintainers; [ cirno-999 ]; + mainProgram = "t7z"; + # RAR code is under non-free UnRAR license, but we remove it + license = licenses.gpl3Only; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 31a9d6d8fbd1..bcf00c88b886 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10268,6 +10268,8 @@ with pkgs; touchegg = callPackage ../tools/inputmethods/touchegg { }; + torrent7z = callPackage ../tools/archivers/torrent7z { }; + torsocks = callPackage ../tools/security/tor/torsocks.nix { }; toss = callPackage ../tools/networking/toss { };