Commit 379ca64b authored by Saterfield990's avatar Saterfield990
Browse files

rtorrent: cleanup

parent 300d2405
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
{
  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";
  };
})