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

50 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, python3Packages
2020-04-15 17:26:42 +00: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 17:26:42 +00:00
optional x11Support xclip ++
optional stdenv.isDarwin pbcopy
);
in
2020-10-14 07:15:43 +00:00
python3Packages.buildPythonApplication rec {
2020-04-15 17:26:42 +00:00
pname = "tremc";
2020-10-14 07:15:43 +00:00
version = "0.9.2";
2020-04-15 17:26:42 +00:00
src = fetchFromGitHub {
owner = "tremc";
repo = pname;
2020-10-14 07:15:43 +00:00
rev = version;
sha256 = "1fqspp2ckafplahgba54xmx0sjidx1pdzyjaqjhz0ivh98dkx2n5";
2020-04-15 17:26:42 +00: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 17:26:42 +00:00
phases = [ "unpackPhase" "installPhase" ];
makeWrapperArgs = ["--prefix PATH : ${wrapperPath}"];
installPhase = ''
make DESTDIR=$out install
wrapPythonPrograms
'';
meta = with lib; {
2020-04-15 17:26:42 +00:00
description = "Curses interface for transmission";
homepage = "https://github.com/tremc/tremc";
2020-10-14 07:28:34 +00:00
license = licenses.gpl3Plus;
2020-04-15 17:26:42 +00:00
};
}