3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/p2p/tremc/default.nix

50 lines
1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, python3Packages
2020-04-15 18:26:42 +01:00
, x11Support ? !stdenv.isDarwin
, xclip ? null
, pbcopy ? null
, useGeoIP ? false # Require /var/lib/geoip-databases/GeoIP.dat
}:
let
2021-01-15 13:21:58 +00:00
wrapperPath = with lib; makeBinPath (
2020-04-15 18:26:42 +01:00
optional x11Support xclip ++
optional stdenv.isDarwin pbcopy
);
in
2020-10-14 08:15:43 +01:00
python3Packages.buildPythonApplication rec {
2020-04-15 18:26:42 +01:00
pname = "tremc";
2020-10-14 08:15:43 +01:00
version = "0.9.2";
2020-04-15 18:26:42 +01:00
src = fetchFromGitHub {
owner = "tremc";
repo = pname;
2020-10-14 08:15:43 +01:00
rev = version;
sha256 = "1fqspp2ckafplahgba54xmx0sjidx1pdzyjaqjhz0ivh98dkx2n5";
2020-04-15 18:26:42 +01:00
};
buildInputs = with python3Packages; [
python
wrapPython
];
pythonPath = with python3Packages; [
ipy
pyperclip
] ++
2021-01-15 13:21:58 +00:00
lib.optional useGeoIP GeoIP;
2020-04-15 18:26:42 +01:00
phases = [ "unpackPhase" "installPhase" ];
makeWrapperArgs = ["--prefix PATH : ${wrapperPath}"];
installPhase = ''
make DESTDIR=$out install
wrapPythonPrograms
'';
meta = with lib; {
2020-04-15 18:26:42 +01:00
description = "Curses interface for transmission";
homepage = "https://github.com/tremc/tremc";
2020-10-14 08:28:34 +01:00
license = licenses.gpl3Plus;
2020-04-15 18:26:42 +01:00
};
}