transmission_4: init at 4.0.3
https://github.com/transmission/transmission/releases/tag/4.0.0 https://github.com/transmission/transmission/releases/tag/4.0.1 https://github.com/transmission/transmission/releases/tag/4.0.2 https://github.com/transmission/transmission/releases/tag/4.0.3
This commit is contained in:
parent
16d311599f
commit
a10db1930c
139
pkgs/applications/networking/p2p/transmission/4.nix
Normal file
139
pkgs/applications/networking/p2p/transmission/4.nix
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, python3
|
||||||
|
, openssl
|
||||||
|
, curl
|
||||||
|
, libevent
|
||||||
|
, inotify-tools
|
||||||
|
, systemd
|
||||||
|
, zlib
|
||||||
|
, pcre
|
||||||
|
, libb64
|
||||||
|
, libutp
|
||||||
|
, libdeflate
|
||||||
|
, miniupnpc
|
||||||
|
, dht
|
||||||
|
, libnatpmp
|
||||||
|
, libiconv
|
||||||
|
, darwin
|
||||||
|
# Build options
|
||||||
|
, enableGTK3 ? false
|
||||||
|
, gtkmm3
|
||||||
|
, xorg
|
||||||
|
, wrapGAppsHook
|
||||||
|
, enableQt ? false
|
||||||
|
, qt5
|
||||||
|
, nixosTests
|
||||||
|
, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||||
|
, enableDaemon ? true
|
||||||
|
, enableCli ? true
|
||||||
|
, installLib ? false
|
||||||
|
, apparmorRulesFromClosure
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "transmission";
|
||||||
|
version = "4.0.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "transmission";
|
||||||
|
repo = "transmission";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-P7omd49xLmReo9Zrg0liO1msUVzCa5CxH7PGmH4oPzg=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = [ "out" "apparmor" ];
|
||||||
|
|
||||||
|
cmakeFlags =
|
||||||
|
let
|
||||||
|
mkFlag = opt: if opt then "ON" else "OFF";
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"-DENABLE_MAC=OFF" # requires xcodebuild
|
||||||
|
"-DENABLE_GTK=${mkFlag enableGTK3}"
|
||||||
|
"-DENABLE_QT=${mkFlag enableQt}"
|
||||||
|
"-DENABLE_DAEMON=${mkFlag enableDaemon}"
|
||||||
|
"-DENABLE_CLI=${mkFlag enableCli}"
|
||||||
|
"-DINSTALL_LIB=${mkFlag installLib}"
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
# Transmission sets this to 10.13 if not explicitly specified, see https://github.com/transmission/transmission/blob/0be7091eb12f4eb55f6690f313ef70a66795ee72/CMakeLists.txt#L7-L16.
|
||||||
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
cmake
|
||||||
|
python3
|
||||||
|
]
|
||||||
|
++ lib.optionals enableGTK3 [ wrapGAppsHook ]
|
||||||
|
++ lib.optionals enableQt [ qt5.wrapQtAppsHook ]
|
||||||
|
;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
curl
|
||||||
|
libevent
|
||||||
|
zlib
|
||||||
|
pcre
|
||||||
|
libb64
|
||||||
|
libutp
|
||||||
|
libdeflate
|
||||||
|
miniupnpc
|
||||||
|
dht
|
||||||
|
libnatpmp
|
||||||
|
]
|
||||||
|
++ lib.optionals enableQt [ qt5.qttools qt5.qtbase ]
|
||||||
|
++ lib.optionals enableGTK3 [ gtkmm3 xorg.libpthreadstubs ]
|
||||||
|
++ lib.optionals enableSystemd [ systemd ]
|
||||||
|
++ lib.optionals stdenv.isLinux [ inotify-tools ]
|
||||||
|
++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Foundation ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir $apparmor
|
||||||
|
cat >$apparmor/bin.transmission-daemon <<EOF
|
||||||
|
include <tunables/global>
|
||||||
|
$out/bin/transmission-daemon {
|
||||||
|
include <abstractions/base>
|
||||||
|
include <abstractions/nameservice>
|
||||||
|
include <abstractions/ssl_certs>
|
||||||
|
include "${apparmorRulesFromClosure { name = "transmission-daemon"; } ([
|
||||||
|
curl libevent openssl pcre zlib libdeflate libnatpmp miniupnpc
|
||||||
|
] ++ lib.optionals enableSystemd [ systemd ]
|
||||||
|
++ lib.optionals stdenv.isLinux [ inotify-tools ]
|
||||||
|
)}"
|
||||||
|
r @{PROC}/sys/kernel/random/uuid,
|
||||||
|
r @{PROC}/sys/vm/overcommit_memory,
|
||||||
|
r @{PROC}/@{pid}/environ,
|
||||||
|
r @{PROC}/@{pid}/mounts,
|
||||||
|
rwk /tmp/tr_session_id_*,
|
||||||
|
|
||||||
|
r $out/share/transmission/web/**,
|
||||||
|
|
||||||
|
include <local/bin.transmission-daemon>
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A fast, easy and free BitTorrent client";
|
||||||
|
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/";
|
||||||
|
license = with lib.licenses; [ gpl2Plus mit ];
|
||||||
|
maintainers = with lib.maintainers; [ astsmtl ];
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
};
|
||||||
|
}
|
@ -35212,6 +35212,15 @@ with pkgs;
|
|||||||
transmission-gtk = transmission.override { enableGTK3 = true; };
|
transmission-gtk = transmission.override { enableGTK3 = true; };
|
||||||
transmission-qt = transmission.override { enableQt = true; };
|
transmission-qt = transmission.override { enableQt = true; };
|
||||||
|
|
||||||
|
transmission_4 = callPackage ../applications/networking/p2p/transmission/4.nix { };
|
||||||
|
libtransmission_4 = transmission_4.override {
|
||||||
|
installLib = true;
|
||||||
|
enableDaemon = false;
|
||||||
|
enableCli = false;
|
||||||
|
};
|
||||||
|
transmission_4-gtk = transmission_4.override { enableGTK3 = true; };
|
||||||
|
transmission_4-qt = transmission_4.override { enableQt = true; };
|
||||||
|
|
||||||
transmission-remote-gtk = callPackage ../applications/networking/p2p/transmission-remote-gtk { };
|
transmission-remote-gtk = callPackage ../applications/networking/p2p/transmission-remote-gtk { };
|
||||||
|
|
||||||
transgui = callPackage ../applications/networking/p2p/transgui { };
|
transgui = callPackage ../applications/networking/p2p/transgui { };
|
||||||
|
Loading…
Reference in New Issue
Block a user