-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
62 lines (61 loc) · 1.75 KB
/
flake.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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.plover_plugins_registry = {
url = "github:openstenoproject/plover_plugins_registry";
flake = false;
};
inputs.plover = {
url = "github:openstenoproject/plover";
flake = false;
};
inputs.rtf-tokenize = {
url = "github:openstenoproject/rtf_tokenize";
flake = false;
};
inputs.plover-stroke = {
url = "github:openstenoproject/plover_stroke";
flake = false;
};
inputs.plover-machine-hid = {
url = "github:dnaq/plover-machine-hid";
flake = false;
};
inputs.plover2cat = {
url = "github:greenwyrt/plover2CAT";
flake = false;
};
outputs = {
self,
nixpkgs,
flake-utils,
...
} @ sources:
flake-utils.lib.eachDefaultSystem
(
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
PLUGINREGISTRY = "${sources.plover_plugins_registry}/registry.json";
packages = with pkgs; [
curl
python311Packages.ipython
jq
];
};
packages.default = self.packages.${system}.plover;
packages.plover = let
pyqt5 = pkgs.python311Packages.pyqt5.override {withMultimedia = true;};
plover = pkgs.python311Packages.callPackage ./plover.nix {inherit sources pyqt5;};
with-plugins = f: let
plugins = pkgs.python311Packages.callPackage ./plugins.nix {inherit plover sources;};
in
plover.overrideAttrs (old: {
propagatedBuildInputs = old.propagatedBuildInputs ++ (f plugins);
});
in
plover // {inherit with-plugins;};
}
);
}