summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p
diff options
context:
space:
mode:
authorRam Kromberg <ramkromberg@mail.com>2016-07-01 13:45:05 +0300
committerRam Kromberg <ramkromberg@mail.com>2016-07-01 13:51:47 +0300
commit0253f7eafbec07721970eb3a89c356fbccd25dd1 (patch)
tree34a0cea89476efafa1b6c1af401a8dcb65c5d9ba /pkgs/applications/networking/p2p
parent14a42dba66bb6258e13724b8b3ebddffff2a4a2f (diff)
downloadnixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.tar
nixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.tar.gz
nixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.tar.bz2
nixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.tar.lz
nixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.tar.xz
nixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.tar.zst
nixlib-0253f7eafbec07721970eb3a89c356fbccd25dd1.zip
transgui: init at 5.0.1-svn-r986
Diffstat (limited to 'pkgs/applications/networking/p2p')
-rw-r--r--pkgs/applications/networking/p2p/transgui/default.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/applications/networking/p2p/transgui/default.nix b/pkgs/applications/networking/p2p/transgui/default.nix
new file mode 100644
index 000000000000..421fd9afb168
--- /dev/null
+++ b/pkgs/applications/networking/p2p/transgui/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchsvn, pkgconfig, makeDesktopItem, unzip, fpc, lazarus,
+libX11, glib, gtk, gdk_pixbuf, pango, atk, cairo, openssl }:
+
+stdenv.mkDerivation rec {
+  name = "transgui-5.0.1-svn-r${revision}";
+  revision = "986";
+
+  src = fetchsvn {
+    url = "https://svn.code.sf.net/p/transgui/code/trunk/";
+    rev = revision;
+    sha256 = "0z83hvlhllm6p1z4gkcfi1x3akgn2xkssnfhwp74qynb0n5362pi";
+  };
+
+  buildInputs = [
+    pkgconfig unzip fpc lazarus stdenv.cc
+    libX11 glib gtk gdk_pixbuf pango atk cairo openssl
+  ];
+
+  NIX_LDFLAGS = "
+    -L${stdenv.cc.cc.lib}/lib
+    -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0
+    -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 -lcairo -lc -lcrypto
+  ";
+
+  prePatch = ''
+    substituteInPlace restranslator.pas --replace /usr/ $out/
+  '';
+
+  makeFlags = [
+    "FPC=fpc"
+    "PP=fpc"
+    "INSTALL_PREFIX=$(out)"
+  ];
+
+  LCL_PLATFORM = "gtk2"; 
+
+  desktopItem = makeDesktopItem rec {
+    name = "transgui";
+    exec = name + " %U";
+    icon = name;
+    type = "Application";
+    comment = meta.description;
+    desktopName = "Transmission Remote GUI";
+    genericName = "BitTorrent Client";
+    categories = stdenv.lib.concatStringsSep ";" [
+      "Application" "Network" "FileTransfer" "P2P" "GTK"
+    ];
+    startupNotify = "true";
+    mimeType = stdenv.lib.concatStringsSep ";" [
+      "application/x-bittorrent" "x-scheme-handler/magnet"
+    ];
+  };
+
+  postInstall = ''
+    mkdir -p "$out/share/applications"
+    cp $desktopItem/share/applications/* $out/share/applications
+    mkdir -p "$out/share/icons/hicolor/48x48/apps"
+    cp transgui.png "$out/share/icons/hicolor/48x48/apps"
+    mkdir -p "$out/share/transgui"
+    cp -r "./lang" "$out/share/transgui" 
+  '';
+
+  meta = { 
+    description = "A cross platform front-end for the Transmission Bit-Torrent client";
+    homepage = https://sourceforge.net/p/transgui;
+    license = stdenv.lib.licenses.gpl2Plus;
+    maintainers = with stdenv.lib.maintainers; [ ramkromberg ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}