From 799ae392daa7a111bc29df7a707c7f387b4006e7 Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Sun, 3 Nov 2024 19:29:38 +0800 Subject: [PATCH 1/2] rtorrent: Format using nixfmt-rfc-style --- pkgs/by-name/rt/rtorrent/package.nix | 48 ++++++++++++++++------------ 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/rt/rtorrent/package.nix b/pkgs/by-name/rt/rtorrent/package.nix index b2739defd11b..6feb575febcd 100644 --- a/pkgs/by-name/rt/rtorrent/package.nix +++ b/pkgs/by-name/rt/rtorrent/package.nix @@ -1,21 +1,22 @@ -{ lib -, stdenv -, autoconf-archive -, autoreconfHook -, cppunit -, curl -, fetchFromGitHub -, installShellFiles -, libsigcxx -, libtool -, libtorrent -, ncurses -, openssl -, pkg-config -, xmlrpc_c -, zlib -, nixosTests -, gitUpdater +{ + lib, + stdenv, + autoconf-archive, + autoreconfHook, + cppunit, + curl, + fetchFromGitHub, + installShellFiles, + libsigcxx, + libtool, + libtorrent, + ncurses, + openssl, + pkg-config, + xmlrpc_c, + zlib, + nixosTests, + gitUpdater, }: stdenv.mkDerivation rec { @@ -29,7 +30,10 @@ stdenv.mkDerivation rec { hash = "sha256-G/30Enycpqg/pWC95CzT9LY99kN4tI+S8aSQhnQO+M8="; }; - outputs = [ "out" "man" ]; + outputs = [ + "out" + "man" + ]; passthru = { inherit libtorrent; @@ -77,7 +81,11 @@ stdenv.mkDerivation rec { homepage = "https://rakshasa.github.io/rtorrent/"; description = "Ncurses client for libtorrent, ideal for use with screen, tmux, or dtach"; license = lib.licenses.gpl2Plus; - maintainers = with lib.maintainers; [ ebzzry codyopel thiagokokada ]; + maintainers = with lib.maintainers; [ + ebzzry + codyopel + thiagokokada + ]; platforms = lib.platforms.unix; mainProgram = "rtorrent"; }; From 93f868007bfabc7e7f730ffd7ee69985954cfcdd Mon Sep 17 00:00:00 2001 From: Zhong Jianxin Date: Sun, 3 Nov 2024 19:40:15 +0800 Subject: [PATCH 2/2] rtorrent: Fix build on darwin --- pkgs/by-name/rt/rtorrent/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/rt/rtorrent/package.nix b/pkgs/by-name/rt/rtorrent/package.nix index 6feb575febcd..94da18d76891 100644 --- a/pkgs/by-name/rt/rtorrent/package.nix +++ b/pkgs/by-name/rt/rtorrent/package.nix @@ -6,6 +6,7 @@ cppunit, curl, fetchFromGitHub, + fetchpatch, installShellFiles, libsigcxx, libtool, @@ -30,6 +31,14 @@ stdenv.mkDerivation rec { hash = "sha256-G/30Enycpqg/pWC95CzT9LY99kN4tI+S8aSQhnQO+M8="; }; + patches = [ + # fix: use fsync for osx builds + (fetchpatch { + url = "https://github.com/rakshasa/rtorrent/commit/5ce84929e44fbe3f8d6cf142e3133f43afa4071f.patch"; + hash = "sha256-bFDxbpkTZ6nIUT2zMxKMgV94vWlVNzBbIbhx4Bpr8gw="; + }) + ]; + outputs = [ "out" "man"