2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook
|
2018-07-21 22:20:01 +01:00
|
|
|
, openssl, curl, libevent, inotify-tools, systemd, zlib, hicolor-icon-theme
|
2013-10-04 19:31:02 +01:00
|
|
|
, enableGTK3 ? false, gtk3
|
2017-01-05 23:24:08 +00:00
|
|
|
, enableSystemd ? stdenv.isLinux
|
2017-01-05 23:27:16 +00:00
|
|
|
, enableDaemon ? true
|
2017-01-05 23:26:51 +00:00
|
|
|
, enableCli ? true
|
2013-10-04 19:31:02 +01:00
|
|
|
}:
|
2013-03-17 21:27:55 +00:00
|
|
|
|
2017-02-09 01:52:13 +00:00
|
|
|
let inherit (stdenv.lib) optional optionals optionalString; in
|
2010-05-20 14:39:16 +01:00
|
|
|
|
2010-03-28 00:06:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-10-04 19:31:02 +01:00
|
|
|
name = "transmission-" + optionalString enableGTK3 "gtk-" + version;
|
2018-05-02 17:02:40 +01:00
|
|
|
version = "2.94";
|
2012-06-18 16:18:45 +01:00
|
|
|
|
2010-03-28 00:06:30 +00:00
|
|
|
src = fetchurl {
|
2018-05-02 17:02:40 +01:00
|
|
|
url = "https://github.com/transmission/transmission-releases/raw/master/transmission-2.94.tar.xz";
|
|
|
|
sha256 = "0zbbj7rlm6m7vb64x68a64cwmijhsrwx9l63hbwqs7zr9742qi1m";
|
2010-03-28 00:06:30 +00:00
|
|
|
};
|
2012-06-18 16:18:45 +01:00
|
|
|
|
2017-11-30 07:04:57 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig ]
|
|
|
|
++ optionals enableGTK3 [ wrapGAppsHook ];
|
2017-09-05 22:26:13 +01:00
|
|
|
buildInputs = [ intltool file openssl curl libevent zlib ]
|
2017-11-30 07:04:57 +00:00
|
|
|
++ optionals enableGTK3 [ gtk3 ]
|
2017-01-05 23:24:08 +00:00
|
|
|
++ optionals enableSystemd [ systemd ]
|
2018-07-21 22:20:01 +01:00
|
|
|
++ optionals stdenv.isLinux [ inotify-tools ]
|
|
|
|
++ optionals enableGTK3 [ hicolor-icon-theme ];
|
2012-06-18 16:18:45 +01:00
|
|
|
|
2016-05-28 13:23:47 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./configure \
|
|
|
|
--replace "libsystemd-daemon" "libsystemd" \
|
2017-01-05 23:28:13 +00:00
|
|
|
--replace "/usr/bin/file" "${file}/bin/file" \
|
|
|
|
--replace "test ! -d /Developer/SDKs/MacOSX10.5.sdk" "false"
|
2013-02-27 12:05:21 +00:00
|
|
|
'';
|
2011-06-13 15:15:15 +01:00
|
|
|
|
2017-01-05 23:24:08 +00:00
|
|
|
configureFlags = [
|
2017-01-05 23:26:51 +00:00
|
|
|
("--enable-cli=" + (if enableCli then "yes" else "no"))
|
2017-01-05 23:27:16 +00:00
|
|
|
("--enable-daemon=" + (if enableDaemon then "yes" else "no"))
|
2017-01-05 23:28:13 +00:00
|
|
|
"--disable-mac" # requires xcodebuild
|
2017-01-05 23:24:08 +00:00
|
|
|
]
|
|
|
|
++ optional enableSystemd "--with-systemd-daemon"
|
2013-10-04 19:31:02 +01:00
|
|
|
++ optional enableGTK3 "--with-gtk";
|
2013-03-17 21:27:55 +00:00
|
|
|
|
2017-01-05 23:28:13 +00:00
|
|
|
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation";
|
|
|
|
|
2013-10-04 19:31:02 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-20 14:39:16 +01:00
|
|
|
description = "A fast, easy and free BitTorrent client";
|
2010-03-28 00:06:30 +00:00
|
|
|
longDescription = ''
|
|
|
|
Transmission is a BitTorrent client which features a simple interface
|
|
|
|
on top of a cross-platform back-end.
|
|
|
|
Feature spotlight:
|
|
|
|
* Uses fewer resources than other clients
|
|
|
|
* Native Mac, GTK+ and Qt GUI clients
|
|
|
|
* Daemon ideal for servers, embedded systems, and headless use
|
|
|
|
* All these can be remote controlled by Web and Terminal clients
|
|
|
|
* Bluetack (PeerGuardian) blocklists with automatic updates
|
|
|
|
* Full encryption, DHT, and PEX support
|
|
|
|
'';
|
|
|
|
homepage = http://www.transmissionbt.com/;
|
2013-10-04 19:31:02 +01:00
|
|
|
license = licenses.gpl2; # parts are under MIT
|
2014-03-14 20:18:16 +00:00
|
|
|
maintainers = with maintainers; [ astsmtl vcunat wizeman ];
|
2017-01-05 23:28:13 +00:00
|
|
|
platforms = platforms.unix;
|
2010-03-28 00:06:30 +00:00
|
|
|
};
|
|
|
|
}
|
2013-10-04 19:31:02 +01:00
|
|
|
|