summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-10-04 20:31:02 +0200
committerVladimír Čunát <vcunat@gmail.com>2013-10-04 20:31:02 +0200
commitae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71 (patch)
tree5803bf14211a287c1c4b3642e3e91330e1c9ecad /pkgs/applications/networking
parente5ebb59e1d4cff48d799bfa89aef0d69a7344c55 (diff)
downloadnixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.tar
nixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.tar.gz
nixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.tar.bz2
nixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.tar.lz
nixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.tar.xz
nixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.tar.zst
nixlib-ae60edca0e94f8b1a9a5d6f11bd0aa2ab2499e71.zip
transmission: unify versions to the newest, use gtk3
Also introduce transmission_gtk attribute and signify gtk client support
in the name (so newbies using package names can see there's a gui version).
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/p2p/transmission/2.60.nix41
-rw-r--r--pkgs/applications/networking/p2p/transmission/default.nix41
2 files changed, 25 insertions, 57 deletions
diff --git a/pkgs/applications/networking/p2p/transmission/2.60.nix b/pkgs/applications/networking/p2p/transmission/2.60.nix
deleted file mode 100644
index c59fddf6364b..000000000000
--- a/pkgs/applications/networking/p2p/transmission/2.60.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent,
-  file, inotifyTools, gtk ? null }:
-
-stdenv.mkDerivation rec {
-  name = "transmission-2.60"; # transmission >= 2.61 requires gtk3
-
-  src = fetchurl {
-    url = "http://download.transmissionbt.com/files/${name}.tar.xz";
-    sha256 = "1ramdliyy8j7qqpkxg643lda11ynxwfhq6qcs31fr3h9x72l0rg4";
-  };
-
-  buildInputs = [ pkgconfig openssl curl intltool libevent
-                  file inotifyTools gtk ];
-
-  preConfigure = ''
-    sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
-  '';
-
-  postInstall = ''
-    rm -f $out/share/icons/hicolor/icon-theme.cache
-  '';
-
-  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 = [ "GPLv2" ];
-    maintainers = [ stdenv.lib.maintainers.astsmtl ];
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/applications/networking/p2p/transmission/default.nix b/pkgs/applications/networking/p2p/transmission/default.nix
index 2c6106d13040..b273b567b775 100644
--- a/pkgs/applications/networking/p2p/transmission/default.nix
+++ b/pkgs/applications/networking/p2p/transmission/default.nix
@@ -1,32 +1,40 @@
-{ stdenv, fetchurl, pkgconfig, openssl, curl, intltool, libevent
-, file, inotifyTools
-, enableGtk ? false, gtk ? null }:
+{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
+, openssl, curl, libevent, inotifyTools
+, enableGTK3 ? false, gtk3
+}:
 
-assert enableGtk -> gtk != null;
+let
+  version = "2.82";
+in
+
+with { inherit (stdenv.lib) optional optionals optionalString; };
 
 stdenv.mkDerivation rec {
-  name = "transmission-2.77"; # transmission >= 2.61 requires gtk3
+  name = "transmission-" + optionalString enableGTK3 "gtk-" + version;
 
   src = fetchurl {
-    url = "http://download.transmissionbt.com/files/${name}.tar.xz";
-    sha256 = "1phzhj4wds6r2ziclva1b5l6l9xjsx5ji7s3m4xia44aq4znbcam";
+    url = "http://download.transmissionbt.com/files/transmission-${version}.tar.xz";
+    sha256 = "08imy28hpjxwdzgvhm66hkfyzp8qnnqr4jhv3rgshryzhw86b5ir";
   };
 
-  buildInputs = [ pkgconfig openssl curl intltool libevent
-                  file inotifyTools ]
-    ++ stdenv.lib.optional enableGtk gtk;
+  buildInputs = [ pkgconfig intltool file openssl curl libevent inotifyTools ]
+    ++ optionals enableGTK3 [ gtk3 makeWrapper ];
 
   preConfigure = ''
     sed -i -e 's|/usr/bin/file|${file}/bin/file|g' configure
   '';
 
-  configureFlags = stdenv.lib.optionalString enableGtk "--with-gtk";
+  configureFlags = [ "--with-systemd-daemon" ]
+    ++ optional enableGTK3 "--with-gtk";
 
   postInstall = ''
-    rm -f $out/share/icons/hicolor/icon-theme.cache
+    rm "$out/share/icons/hicolor/icon-theme.cache"
+  '' + optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
+    wrapProgram "$out/bin/transmission-gtk" \
+      --prefix XDG_DATA_DIRS : "${gtk3}/share"
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "A fast, easy and free BitTorrent client";
     longDescription = ''
       Transmission is a BitTorrent client which features a simple interface
@@ -40,8 +48,9 @@ stdenv.mkDerivation rec {
         * Full encryption, DHT, and PEX support
     '';
     homepage = http://www.transmissionbt.com/;
-    license = [ "GPLv2" ];
-    maintainers = [ stdenv.lib.maintainers.astsmtl ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2; # parts are under MIT
+    maintainers = with maintainers; [ astsmtl vcunat ];
+    platforms = platforms.linux;
   };
 }
+