transmission: 2.94 -> 3.00

This commit is contained in:
adisbladis 2020-05-23 18:46:17 +01:00
parent 29d57de301
commit 83018f4fc6
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7
2 changed files with 70 additions and 35 deletions

View File

@ -1,47 +1,81 @@
{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook { stdenv
, openssl, curl, libevent, inotify-tools, systemd, zlib , lib
, enableGTK3 ? false, gtk3 , fetchFromGitHub
, cmake
, pkgconfig
, openssl
, curl
, libevent
, inotify-tools
, systemd
, zlib
, pcre
# Build options
, enableGTK3 ? false
, gnome3
, xorg
, wrapGAppsHook
, enableQt ? false
, qt5
, enableSystemd ? stdenv.isLinux , enableSystemd ? stdenv.isLinux
, enableDaemon ? true , enableDaemon ? true
, enableCli ? true , enableCli ? true
}: }:
let inherit (stdenv.lib) optional optionals optionalString; in let
version = "3.00";
stdenv.mkDerivation rec { in stdenv.mkDerivation {
name = "transmission-" + optionalString enableGTK3 "gtk-" + version; pname = "transmission";
version = "2.94"; inherit version;
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/transmission/transmission-releases/raw/master/transmission-2.94.tar.xz"; owner = "transmission";
sha256 = "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m"; repo = "transmission";
rev = version;
sha256 = "0ccg0km54f700x9p0jsnncnwvfnxfnxf7kcm7pcx1cj0vw78924z";
fetchSubmodules = true;
}; };
nativeBuildInputs = [ pkgconfig ] cmakeFlags =
++ optionals enableGTK3 [ wrapGAppsHook ]; let
buildInputs = [ intltool file openssl curl libevent zlib ] mkFlag = opt: if opt then "ON" else "OFF";
++ optionals enableGTK3 [ gtk3 ] in
++ optionals enableSystemd [ systemd ] [
++ optionals stdenv.isLinux [ inotify-tools ]; "-DENABLE_MAC=OFF" # requires xcodebuild
"-DENABLE_GTK=${mkFlag enableGTK3}"
"-DENABLE_QT=${mkFlag enableQt}"
"-DENABLE_DAEMON=${mkFlag enableDaemon}"
"-DENABLE_CLI=${mkFlag enableCli}"
];
postPatch = '' nativeBuildInputs = [
substituteInPlace ./configure \ pkgconfig
--replace "libsystemd-daemon" "libsystemd" \ cmake
--replace "/usr/bin/file" "${file}/bin/file" \
--replace "test ! -d /Developer/SDKs/MacOSX10.5.sdk" "false"
'';
configureFlags = [
("--enable-cli=" + (if enableCli then "yes" else "no"))
("--enable-daemon=" + (if enableDaemon then "yes" else "no"))
"--disable-mac" # requires xcodebuild
] ]
++ optional enableSystemd "--with-systemd-daemon" ++ lib.optionals enableGTK3 [ wrapGAppsHook ]
++ optional enableGTK3 "--with-gtk"; ++ lib.optionals enableQt [ qt5.wrapQtAppsHook ]
;
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation"; buildInputs = [
openssl
curl
libevent
zlib
pcre
]
++ lib.optionals enableQt [ qt5.qttools qt5.qtbase ]
++ lib.optionals enableGTK3 [ gnome3.gtk xorg.libpthreadstubs ]
++ lib.optionals enableSystemd [ systemd ]
++ lib.optionals stdenv.isLinux [ inotify-tools ]
;
meta = with stdenv.lib; { NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework CoreFoundation";
# Reduce the risk of collisions
postInstall = "rm -r $out/share/doc";
meta = {
description = "A fast, easy and free BitTorrent client"; description = "A fast, easy and free BitTorrent client";
longDescription = '' longDescription = ''
Transmission is a BitTorrent client which features a simple interface Transmission is a BitTorrent client which features a simple interface
@ -55,9 +89,9 @@ stdenv.mkDerivation rec {
* Full encryption, DHT, and PEX support * Full encryption, DHT, and PEX support
''; '';
homepage = "http://www.transmissionbt.com/"; homepage = "http://www.transmissionbt.com/";
license = licenses.gpl2; # parts are under MIT license = lib.licenses.gpl2; # parts are under MIT
maintainers = with maintainers; [ astsmtl vcunat wizeman ]; maintainers = with lib.maintainers; [ astsmtl vcunat wizeman ];
platforms = platforms.unix; platforms = lib.platforms.unix;
}; };
}
}

View File

@ -22322,6 +22322,7 @@ in
transmission = callPackage ../applications/networking/p2p/transmission { }; transmission = callPackage ../applications/networking/p2p/transmission { };
transmission-gtk = transmission.override { enableGTK3 = true; }; transmission-gtk = transmission.override { enableGTK3 = true; };
transmission-qt = transmission.override { enableQt = true; };
transmission-remote-cli = callPackage ../applications/networking/p2p/transmission-remote-cli {}; transmission-remote-cli = callPackage ../applications/networking/p2p/transmission-remote-cli {};
transmission-remote-gtk = callPackage ../applications/networking/p2p/transmission-remote-gtk {}; transmission-remote-gtk = callPackage ../applications/networking/p2p/transmission-remote-gtk {};