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

60 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, 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
};
patches = [
# Remove when version >0.9.2 is released
(fetchpatch {
url = "https://github.com/tremc/tremc/commit/bdffff2bd76186a4e3488b83f719fc7f7e3362b6.patch";
sha256 = "1zip2skh22v0yyv2hmszxn5jshp9m1jpw0fsyfvmqfxzq7m3czy5";
name = "replace-decodestring-with-decodebytes.patch";
})
];
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
2021-08-02 23:04:51 +01:00
dontBuild = true;
doCheck = false;
2020-04-15 18:26:42 +01:00
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
};
}