@@ -0,0 +1,54 @@
1+{ stdenv, fetchFromGitHub, fetchpatch, pythonPackages, gocr, unrar, rhino, spidermonkey }:
2+pythonPackages.buildPythonApplication rec {
3+ version = "0.4.9-next";
4+ name = "pyLoad-" + version;
5+
6+ src = fetchFromGitHub {
7+ owner = "pyload";
8+ repo = "pyload";
9+ rev = "03f3ad9e39da2b9a378987693c4a69720e4084c7";
10+ sha256 = "0fgsz6yzxrlq3qvsyxsyzgmy4za35v1xh3i4drhispk9zb5jm1xx";
11+ };
12+
13+ patches =
14+ let
15+ # gets merged in next release version of pyload
16+ configParserPatch = fetchpatch {
17+ url = "https://patch-diff.githubusercontent.com/raw/pyload/pyload/pull/2625.diff";
18+ sha256 = "1bisgx78kcr5c0x0i3h0ch5mykns5wx5wx7gvjj0pc71lfzlxzb9";
19+ };
20+ setupPyPatch = fetchpatch {
21+ url = "https://patch-diff.githubusercontent.com/raw/pyload/pyload/pull/2638.diff";
22+ sha256 = "1gmvsmlcvb96g48kibv47cbmb5slivy3c5qflb5n0qc8k7axg3i9";
23+ };
24+ in [ configParserPatch setupPyPatch ];
25+
26+ buildInputs = [
27+ unrar rhino spidermonkey gocr pythonPackages.paver
28+ ];
29+
30+ propagatedBuildInputs = with pythonPackages; [
31+ pycurl jinja2 beaker thrift simplejson pycrypto feedparser pyqt4 gdbm
32+ tkinter beautifulsoup
33+ ];
34+
35+ #remove this once the PR patches above are merged. Needed because githubs diff endpoint
36+ #does not support diff -N
37+ prePatch = ''
38+ touch module/config/__init__.py
39+ '';
40+
41+ preBuild = ''
42+ paver generate_setup
43+ '';
44+
45+ doCheck = false;
46+
47+ meta = {
48+ description = "Free and open source downloader for 1-click-hosting sites";
49+ homepage = https://github.com/pyload/pyload;
50+ license = stdenv.lib.licenses.gpl3;
51+ maintainers = [ stdenv.lib.maintainers.mahe ];
52+ platforms = stdenv.lib.platforms.all;
53+ };
54+}