tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
hydrus: correct dependencies, simply external programs
Daniel Olsen
4 years ago
c8516c8c
97be046b
+24
-25
1 changed file
expand all
collapse all
unified
split
pkgs
applications
graphics
hydrus
default.nix
+24
-25
pkgs/applications/graphics/hydrus/default.nix
···
1
1
{ lib
2
2
, fetchFromGitHub
3
3
-
, xz
4
3
, wrapQtAppsHook
5
4
, miniupnpc_2
5
5
+
, ffmpeg
6
6
, enableSwftools ? false
7
7
, swftools
8
8
-
, pythonPackages
8
8
+
, python3Packages
9
9
}:
10
10
11
11
-
pythonPackages.buildPythonPackage rec {
11
11
+
python3Packages.buildPythonPackage rec {
12
12
pname = "hydrus";
13
13
version = "447";
14
14
format = "other";
···
24
24
wrapQtAppsHook
25
25
];
26
26
27
27
-
propagatedBuildInputs = with pythonPackages; [
27
27
+
propagatedBuildInputs = with python3Packages; [
28
28
beautifulsoup4
29
29
+
chardet
30
30
+
cloudscraper
29
31
html5lib
30
32
lxml
33
33
+
lz4
34
34
+
nose
31
35
numpy
32
36
opencv4
33
37
pillow
34
38
psutil
39
39
+
pylzma
35
40
pyopenssl
41
41
+
pyside2
42
42
+
pysocks
43
43
+
pythonPackages.mpv
36
44
pyyaml
37
37
-
pylzma
45
45
+
qtpy
38
46
requests
39
47
send2trash
40
48
service-identity
49
49
+
six
41
50
twisted
42
42
-
lz4
43
43
-
xz
44
44
-
pysocks
45
45
-
matplotlib
46
46
-
qtpy
47
47
-
pyside2
48
48
-
mpv
49
51
];
50
52
51
51
-
checkInputs = with pythonPackages; [ nose httmock ];
53
53
+
checkInputs = with python3Packages; [ nose mock httmock ];
52
54
53
55
# most tests are failing, presumably because we are not using test.py
54
56
checkPhase = ''
···
78
80
79
81
outputs = [ "out" "doc" ];
80
82
81
81
-
postPatch = ''
82
82
-
sed 's;os\.path\.join(\sHC\.BIN_DIR,.*;"${miniupnpc_2}/bin/upnpc";' \
83
83
-
-i ./hydrus/core/networking/HydrusNATPunch.py
84
84
-
'' + lib.optionalString enableSwftools ''
85
85
-
sed 's;os\.path\.join(\sHC\.BIN_DIR,.*;"${swftools}/bin/swfrender";' \
86
86
-
-i ./hydrus/core/HydrusFlashHandling.py
87
87
-
'';
88
88
-
89
89
-
#doCheck = true;
90
90
-
91
83
installPhase = ''
92
84
# Move the hydrus module and related directories
93
93
-
mkdir -p $out/${pythonPackages.python.sitePackages}
94
94
-
mv {hydrus,static} $out/${pythonPackages.python.sitePackages}
85
85
+
mkdir -p $out/${python3Packages.python.sitePackages}
86
86
+
mv {hydrus,static} $out/${python3Packages.python.sitePackages}
95
87
mv help $out/doc/
96
88
97
89
# install the hydrus binaries
98
90
mkdir -p $out/bin
99
91
install -m0755 server.py $out/bin/hydrus-server
100
92
install -m0755 client.py $out/bin/hydrus-client
93
93
+
'' + lib.optionalString enableSwftools ''
94
94
+
mkdir -p $out/${python3Packages.python.sitePackages}/bin
95
95
+
# swfrender seems to have to be called sfwrender_linux
96
96
+
# not sure if it can be loaded through PATH, but this is simpler
97
97
+
# $out/python3Packages.python.sitePackages/bin is correct NOT .../hydrus/bin
98
98
+
ln -s ${swftools}/bin/swfrender $out/${python3Packages.python.sitePackages}/bin/swfrender_linux
101
99
'';
102
100
103
101
dontWrapQtApps = true;
104
102
preFixup = ''
105
103
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
104
104
+
makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg miniupnpc_2 ]})
106
105
'';
107
106
108
107
meta = with lib; {