This repository has been archived by the owner on Apr 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.nix
193 lines (161 loc) · 5.05 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
{ pkgs ? import <nixpkgs> {}, sources }:
let
pyqt5 = pkgs.python3Packages.pyqt5.override { withMultimedia = true; };
hidapi = with pkgs; with python3Packages; buildPythonPackage rec {
pname = "hidapi";
version = "0.11.0.post2";
src = fetchPypi {
inherit pname version;
hash = "sha256-2oFeDR1LLvHrvMhQNFchBdyilifrYYgTN6o5AQ8u+Ms=";
};
nativeBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
propagatedBuildInputs = [ cython ]
++ lib.optionals stdenv.isLinux [ pkgs.libusb1 udev ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]);
# Fix the USB backend library lookup
postPatch = lib.optionalString stdenv.isLinux ''
libusb=${pkgs.libusb1.dev}/include/libusb-1.0
test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; }
sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py
'';
pythonImportsCheck = [ "hid" ];
meta = with lib; {
description = "A Cython interface to the hidapi from https://github.com/libusb/hidapi";
homepage = "https://github.com/trezor/cython-hidapi";
# license can actually be either bsd3 or gpl3
# see https://github.com/trezor/cython-hidapi/blob/master/LICENSE-orig.txt
license = with licenses; [ bsd3 gpl3Only ];
maintainers = with maintainers; [ np prusnak ];
};
};
path = with pkgs.python3Packages; buildPythonPackage rec {
pname = "path";
version = "16.2.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-Lekl6NQh+TvOqA1RG4Gsz7an5rJJr6SlVZVXsM+BcJc=";
};
checkInputs = [ pytest ];
};
requests-futures = with pkgs.python3Packages; buildPythonPackage rec {
pname = "requests-futures";
version = "1.0.0";
disabled = pythonOlder "3.3";
src = fetchPypi {
inherit pname version;
sha256 = "0j611g1wkn98qp2b16kqz7lfz29a153jyfm02r3h8n0rpw17am1m";
};
propagatedBuildInputs = [ requests ];
doCheck = false;
pythonImportsCheck = [ "requests_futures" ];
};
plover-stroke = with pkgs.python3Packages; buildPythonPackage rec {
pname = "plover_stroke";
version = "1.0.0";
disabled = pythonOlder "3.3";
src = sources.plover-stroke;
doCheck = false;
};
rtf-tokenize = with pkgs.python3Packages; buildPythonPackage rec {
pname = "rtf-tokenize";
version = "1.0.0";
disabled = pythonOlder "3.3";
src = sources.rtf-tokenize;
doCheck = false;
};
plover-dict-commands = with pkgs.python3Packages; buildPythonPackage rec {
pname = "plover_dict_commands";
version = "0.2.5";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-ki/M5V106YbQMjZQmkTNyBzFboVYi/x0hkLAXqPyk8Q=";
};
buildInputs = [ plover setuptools-scm ];
doCheck = false;
};
plover = with pkgs.python3Packages; pkgs.qt5.mkDerivationWith buildPythonPackage rec {
pname = "plover";
version = "master";
src = sources.plover;
checkInputs = [ pytest mock ];
propagatedBuildInputs = [
Babel
pyqt5
xlib
pyserial
appdirs
wcwidth
setuptools
certifi
plover-stroke
rtf-tokenize
hid
];
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
doCheck = false;
};
plugins-manager = with pkgs.python3Packages; buildPythonPackage rec {
pname = "plover-plugins-manager";
version = "master";
src = sources.plover-plugins-manager;
patches = [ ./plover-plugins-manager.patch ];
buildInputs = [ plover ];
propagatedBuildInputs = [
pip
pkginfo
pygments
readme_renderer
requests
requests-cache
requests-futures
setuptools
wheel
];
checkInputs = [ path pytest ];
doCheck = false;
};
spyll = with pkgs; with python3Packages; buildPythonPackage rec {
pname = "spyll";
version = "1.2.3";
src = fetchPypi {
inherit pname version;
hash = "sha256-g2ieAtU2+1FMY3jUWAH3KprefrtQMejyGn6KM7T5Av8=";
};
};
spylls = with pkgs; with python3Packages; buildPythonPackage rec {
pname = "spylls";
version = "0.1.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-cEWJLcvTJNNoX2nFp2AGPnj7g5kTckzhgHfPCgyT8iA=";
};
propagatedBuildInputs = [ spyll ];
};
plover2cat = with pkgs.python3Packages; pkgs.qt5.mkDerivationWith buildPythonPackage rec {
pname = "plover2cat";
version = "master";
src = sources.plover2cat;
buildInputs = [ plover ];
propagatedBuildInputs = [
odfpy
pyparsing
plover-dict-commands
spylls
dulwich
];
dontWrapQtApps = true;
doCheck = false;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
};
plover-with-plugins = plover.overrideAttrs (old: rec {
pname = "plover-with-plugins";
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.python3Packages.setuptools plugins-manager plover2cat ];
permitUserSite = true;
});
in
plover-with-plugins