nixpkgs/pkgs/applications/networking/p2p/transgui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
2.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, pkg-config, makeDesktopItem, fetchpatch, unzip
, fpc, lazarus, libX11, glib, gtk2, gdk-pixbuf, pango, atk, cairo, openssl }:
2016-07-01 10:45:05 +00:00
stdenv.mkDerivation rec {
2019-07-02 23:41:07 +00:00
pname = "transgui";
version = "unstable-2023-10-19";
2019-07-02 23:41:07 +00:00
src = fetchFromGitHub {
owner = "transmission-remote-gui";
repo = "transgui";
rev = "b1f5c2334edb6659c04863ef4a534ba1e57284f0";
sha256 = "sha256-XCokcA5lINC9B+qwg0vjkymwa16ZNHRKLI829+X7CvE=";
2016-07-01 10:45:05 +00:00
};
nativeBuildInputs = [ pkg-config unzip ];
2016-07-01 10:45:05 +00:00
buildInputs = [
fpc lazarus stdenv.cc libX11 glib gtk2 gdk-pixbuf
pango atk cairo openssl
2016-07-01 10:45:05 +00: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
'';
2016-07-01 10:45:05 +00:00
postPatch = ''
2016-07-01 10:45:05 +00:00
substituteInPlace restranslator.pas --replace /usr/ $out/
'';
2019-07-02 23:41:07 +00:00
preBuild = ''
FPCDIR=${fpc}/lib/fpc/${fpc.version} fpcmake -w
2019-07-02 23:41:07 +00:00
lazbuild -B transgui.lpr --lazarusdir=${lazarus}/share/lazarus
'';
makeFlags = [ "FPC=fpc" "PP=fpc" "INSTALL_PREFIX=$(out)" ];
2016-07-01 10:45:05 +00:00
2019-05-22 11:03:39 +00:00
LCL_PLATFORM = "gtk2";
2016-07-01 10:45:05 +00:00
desktopItem = makeDesktopItem {
name = pname;
exec = "${pname} %U";
icon = pname;
2016-07-01 10:45:05 +00:00
type = "Application";
comment = meta.description;
desktopName = "Transmission Remote GUI";
genericName = "BitTorrent Client";
categories = [ "Network" "FileTransfer" "P2P" "GTK" ];
startupNotify = true;
mimeTypes = [ "application/x-bittorrent" "x-scheme-handler/magnet" ];
2016-07-01 10:45:05 +00:00
};
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 11:03:39 +00:00
cp -r "./lang" "$out/share/transgui"
2016-07-01 10:45:05 +00:00
'';
2019-05-22 11:03:39 +00:00
meta = {
description = "A cross platform front-end for the Transmission BitTorrent client";
homepage = "https://sourceforge.net/p/transgui";
2021-01-15 13:21:58 +00:00
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ramkromberg ];
mainProgram = "transgui";
platforms = [ "x86_64-linux" "x86_64-darwin" ];
2016-07-01 10:45:05 +00:00
};
}