2021-01-19 06:50:56 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, makeDesktopItem, unzip, fpc, lazarus,
|
2019-05-22 12:03:39 +01:00
|
|
|
libX11, glib, gtk2, gdk-pixbuf, pango, atk, cairo, openssl }:
|
2016-07-01 11:45:05 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-03 00:41:07 +01:00
|
|
|
pname = "transgui";
|
2019-10-24 15:24:20 +01:00
|
|
|
version = "5.18.0";
|
2019-07-03 00:41:07 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "transmission-remote-gui";
|
|
|
|
repo = "transgui";
|
|
|
|
rev = "v${version}";
|
2019-10-24 15:24:20 +01:00
|
|
|
sha256 = "1dyx778756zhvz5sxgdvy49p2c0x44w4nmcfd90wqrmgfknncnf5";
|
2016-07-01 11:45:05 +01:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2016-07-01 11:45:05 +01:00
|
|
|
buildInputs = [
|
2017-09-14 20:24:37 +01:00
|
|
|
unzip fpc lazarus stdenv.cc
|
2019-05-22 12:03:39 +01:00
|
|
|
libX11 glib gtk2 gdk-pixbuf pango atk cairo openssl
|
2016-07-01 11:45:05 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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/
|
|
|
|
'';
|
|
|
|
|
2019-07-03 00:41:07 +01:00
|
|
|
preBuild = ''
|
|
|
|
lazbuild -B transgui.lpr --lazarusdir=${lazarus}/share/lazarus
|
|
|
|
'';
|
2017-12-20 16:41:20 +00:00
|
|
|
|
2016-07-01 11:45:05 +01:00
|
|
|
makeFlags = [
|
|
|
|
"FPC=fpc"
|
|
|
|
"PP=fpc"
|
|
|
|
"INSTALL_PREFIX=$(out)"
|
|
|
|
];
|
|
|
|
|
2019-05-22 12:03:39 +01:00
|
|
|
LCL_PLATFORM = "gtk2";
|
2016-07-01 11:45:05 +01:00
|
|
|
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "transgui";
|
|
|
|
exec = name + " %U";
|
|
|
|
icon = name;
|
|
|
|
type = "Application";
|
|
|
|
comment = meta.description;
|
|
|
|
desktopName = "Transmission Remote GUI";
|
|
|
|
genericName = "BitTorrent Client";
|
2021-01-15 13:21:58 +00:00
|
|
|
categories = lib.concatStringsSep ";" [
|
2016-07-01 11:45:05 +01:00
|
|
|
"Application" "Network" "FileTransfer" "P2P" "GTK"
|
|
|
|
];
|
|
|
|
startupNotify = "true";
|
2021-01-15 13:21:58 +00:00
|
|
|
mimeType = lib.concatStringsSep ";" [
|
2016-07-01 11:45:05 +01:00
|
|
|
"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"
|
2019-05-22 12:03:39 +01:00
|
|
|
cp -r "./lang" "$out/share/transgui"
|
2016-07-01 11:45:05 +01:00
|
|
|
'';
|
|
|
|
|
2019-05-22 12:03:39 +01:00
|
|
|
meta = {
|
2016-07-01 11:45:05 +01:00
|
|
|
description = "A cross platform front-end for the Transmission Bit-Torrent client";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://sourceforge.net/p/transgui";
|
2021-01-15 13:21:58 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [ ramkromberg ];
|
|
|
|
platforms = lib.platforms.linux;
|
2016-07-01 11:45:05 +01:00
|
|
|
};
|
|
|
|
}
|