1 { lib, stdenv, fetchFromGitHub, pkg-config, makeDesktopItem, unzip
2 , fpc, lazarus, libX11, glib, gtk2, gdk-pixbuf, pango, atk, cairo, openssl
3 , unstableGitUpdater }:
5 stdenv.mkDerivation rec {
7 version = "5.18.0-unstable-2024-02-26";
9 src = fetchFromGitHub {
10 owner = "transmission-remote-gui";
12 rev = "25df397d92fbd53b970ef72a6ffd9f644458f935";
13 hash = "sha256-jQIe2vTDeJM/lhl6alNhEPOqXjyd18x+Kg29+le/dks=";
16 nativeBuildInputs = [ pkg-config unzip ];
18 fpc lazarus stdenv.cc libX11 glib gtk2 gdk-pixbuf
19 pango atk cairo openssl
23 -L${lib.getLib stdenv.cc.cc}/lib -lX11 -lglib-2.0 -lgtk-x11-2.0
24 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 -lcairo
29 substituteInPlace restranslator.pas --replace /usr/ $out/
33 FPCDIR=${fpc}/lib/fpc/${fpc.version} fpcmake -w
34 lazbuild -B transgui.lpr --lazarusdir=${lazarus}/share/lazarus
37 makeFlags = [ "FPC=fpc" "PP=fpc" "INSTALL_PREFIX=$(out)" ];
39 LCL_PLATFORM = "gtk2";
41 desktopItem = makeDesktopItem {
46 comment = meta.description;
47 desktopName = "Transmission Remote GUI";
48 genericName = "BitTorrent Client";
49 categories = [ "Network" "FileTransfer" "P2P" "GTK" ];
51 mimeTypes = [ "application/x-bittorrent" "x-scheme-handler/magnet" ];
55 mkdir -p "$out/share/applications"
56 cp $desktopItem/share/applications/* $out/share/applications
57 mkdir -p "$out/share/icons/hicolor/48x48/apps"
58 cp transgui.png "$out/share/icons/hicolor/48x48/apps"
59 mkdir -p "$out/share/transgui"
60 cp -r "./lang" "$out/share/transgui"
63 passthru.updateScript = unstableGitUpdater {
68 description = "A cross platform front-end for the Transmission BitTorrent client";
69 homepage = "https://sourceforge.net/p/transgui";
70 license = lib.licenses.gpl2Plus;
71 maintainers = with lib.maintainers; [ ramkromberg ];
72 mainProgram = "transgui";
73 platforms = [ "x86_64-linux" "x86_64-darwin" ];