diff --git a/pkgs/by-name/rt/rtorrent/package.nix b/pkgs/by-name/rt/rtorrent/package.nix index b460ce6699b2..cb0f536e6d41 100644 --- a/pkgs/by-name/rt/rtorrent/package.nix +++ b/pkgs/by-name/rt/rtorrent/package.nix @@ -1,21 +1,22 @@ { - lib, - stdenv, autoreconfHook, cppunit, curl, fetchFromGitHub, installShellFiles, + lib, libtool, libtorrent-rakshasa, + lua5_4_compat, ncurses, + nixosTests, + nix-update-script, openssl, pkg-config, - zlib, - nixosTests, - gitUpdater, + stdenv, + versionCheckHook, withLua ? false, - lua5_4_compat, + zlib, }: stdenv.mkDerivation (finalAttrs: { @@ -25,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchFromGitHub { owner = "rakshasa"; repo = "rtorrent"; - rev = "v${finalAttrs.version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-+lpivm3MXbuJ4XYhK5OaASpqpDKcCdW7JCFjQYBYCSA="; }; @@ -34,10 +35,6 @@ stdenv.mkDerivation (finalAttrs: { "man" ]; - passthru = { - inherit libtorrent-rakshasa; - }; - nativeBuildInputs = [ autoreconfHook installShellFiles @@ -61,13 +58,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals withLua [ "--with-lua" ]; - passthru = { - updateScript = gitUpdater { rev-prefix = "v"; }; - tests = { - inherit (nixosTests) rtorrent; - }; - }; - enableParallelBuilding = true; postInstall = '' @@ -75,16 +65,26 @@ stdenv.mkDerivation (finalAttrs: { install -Dm644 doc/rtorrent.rc-example -t $out/share/doc/rtorrent/rtorrent.rc ''; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "-h"; + + passthru = { + inherit libtorrent-rakshasa; + tests = { inherit (nixosTests) rtorrent; }; + updateScript = nix-update-script { }; + }; + meta = { - homepage = "https://rakshasa.github.io/rtorrent/"; description = "Ncurses client for libtorrent, ideal for use with screen, tmux, or dtach"; + homepage = "https://rakshasa.github.io/rtorrent/"; license = lib.licenses.gpl2Plus; + mainProgram = "rtorrent"; maintainers = with lib.maintainers; [ ebzzry codyopel thiagokokada ]; platforms = lib.platforms.unix; - mainProgram = "rtorrent"; }; })