Skip to content

Commit a1ccd76

Browse files
authored
Update overrides (#257)
* overrides.nix: sort arguments and attributes * update overrides and mark broken plugins * move `plover2cat` definition from `extra-plugins.nix` to `overrides.nix` * add `packages.plover-full` for enabling all the available plugins * CI: add `nix build .#plover-full` test * update `flake.nix` * update `readme.md` about `plover-full`
1 parent f797bae commit a1ccd76

File tree

7 files changed

+469
-87
lines changed

7 files changed

+469
-87
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ jobs:
1616
nix_path: nixpkgs=channel:nixos-unstable
1717
- run: nix fmt -- --ci
1818
- run: nix build
19+
- run: nix build .#plover-full

extra-plugins.nix

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,9 @@
33
plover,
44
hid,
55
bitarray,
6-
dulwich,
7-
odfpy,
8-
pyparsing,
96
setuptools,
10-
tomli,
11-
websocket-client,
12-
hatchling,
137
buildPythonPackage,
14-
fetchPypi,
158
}:
16-
let
17-
spylls = buildPythonPackage rec {
18-
pname = "spylls";
19-
version = "0.1.7";
20-
src = fetchPypi {
21-
inherit pname version;
22-
sha256 = "sha256-cEWJLcvTJNNoX2nFp2AGPnj7g5kTckzhgHfPCgyT8iA=";
23-
};
24-
doCheck = false;
25-
};
26-
obsws-python = buildPythonPackage rec {
27-
pname = "obsws_python";
28-
version = "1.6.1";
29-
src = fetchPypi {
30-
inherit pname version;
31-
sha256 = "sha256-n1l4M3xVfp+8pnO1rF3Ww7Vwyi6GCD3/QHLbrZOXp7w=";
32-
};
33-
buildInputs = [ hatchling ];
34-
dependencies = [
35-
tomli
36-
websocket-client
37-
];
38-
};
39-
in
409
{
4110
plover-machine-hid = buildPythonPackage {
4211
pname = "plover-machine-hid";
@@ -49,21 +18,7 @@ in
4918
hid
5019
bitarray
5120
];
52-
};
53-
plover2cat = buildPythonPackage {
54-
pname = "plover2cat";
55-
version = "master";
56-
src = inputs.plover2cat;
57-
pyproject = true;
58-
build-system = [ setuptools ];
59-
buildInputs = [ plover ];
60-
dependencies = [
61-
dulwich
62-
odfpy
63-
pyparsing
64-
spylls
65-
obsws-python
66-
];
67-
doCheck = false;
21+
# ModuleNotFoundError: No module named 'PyQt5'
22+
meta.broken = true;
6823
};
6924
}

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@
7474
in
7575
plover' // { inherit withPlugins; };
7676

77+
plover-full =
78+
let
79+
plover' = plover.withPlugins (
80+
ps: builtins.filter (x: x ? meta && !x.meta.broken) (builtins.attrValues ps)
81+
);
82+
withPlugins =
83+
f: # f is a function such as (ps: with ps; [ plugin names ])
84+
plover'.overridePythonAttrs (old: {
85+
dependencies = old.dependencies ++ (f self.ploverPlugins.${pkgs.system});
86+
});
87+
in
88+
plover' // { inherit withPlugins; };
89+
7790
update = pkgs.callPackage ./update.nix { inherit inputs; };
7891
});
7992

0 commit comments

Comments
 (0)