1 { lib, stdenv, fetchFromGitHub, fetchpatch, ncurses }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "BubblesInTheTub";
11 sha256 = "Y2tr0+z9uij4Ifi6FfWRN24BwcDXUZKVLkLtKUiVjU4=";
16 name = "fix-gcc10-compilation.patch"; # Fix compilation on GCC 10. This patch is included on the latest commit
18 "https://github.com/paulyc/torrent7z/commit/5958f42a364c430b3ed4ac68911bbbea1f967fc4.patch";
19 sha256 = "vJOv1sG9XwTvvxQiWew0H5ALoUb9wIAouzTsTvKHuPI=";
23 buildInputs = [ ncurses ];
25 hardeningDisable = [ "format" ];
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' {} +
35 mkdir linux_src/p7zip_4.65/bin
36 cd linux_src/p7zip_4.65/CPP/7zip/Bundles/Alone
41 cp ../../../../bin/t7z $out/bin
45 homepage = "https://github.com/BubblesInTheTub/torrent7z";
46 description = "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 ];
50 # RAR code is under non-free UnRAR license, but we remove it
51 license = licenses.gpl3Only;