modules(weechat): use python rather than packageset alias
Tony Olagbaiye
14 days ago
30 | 30 | inherit (cfg) init; |
31 | 31 | }; |
32 | 32 | pythonOverride = { |
33 | python3Packages = cfg.pythonPackages; | |
33 | python3Packages = cfg.python.pkgs; | |
34 | 34 | }; |
35 | 35 | defaultHomeDirectory = "${config.users.users.weechat.home or "~weechat"}/.weechat"; |
36 | 36 | weechatrc = "${config.users.users.weechat.home}/${config.environment.etc."weechat/weechatrc".target}"; |
42 | 42 | type = types.package; |
43 | 43 | defaultText = "pkgs.weechat"; |
44 | 44 | default = cfg.packageWrapper cfg.packageUnwrapped { inherit configure; }; |
45 | description = "Weechat package to use"; | |
45 | 46 | }; |
46 | 47 | |
47 | 48 | packageUnwrapped = mkOption { |
48 | 49 | type = types.package; |
49 | 50 | defaultText = "pkgs.weechat-unwrapped"; |
50 | 51 | default = pkgs.weechat-unwrapped.override pythonOverride; |
52 | description = "Weechat-unwrapped package to use"; | |
51 | 53 | }; |
52 | 54 | |
53 | 55 | packageWrapper = mkOption { |
54 | 56 | type = types.unspecified; |
55 | 57 | defaultText = "pkgs.wrapWeechat"; |
56 | 58 | default = pkgs.wrapWeechat.override pythonOverride; |
59 | description = "Weechat wrapper package to use"; | |
57 | 60 | }; |
58 | 61 | |
59 | pythonPackages = mkOption { | |
62 | python = mkOption { | |
60 | 63 | type = types.unspecified; |
61 | defaultText = "pkgs.python3Packages"; | |
62 | example = literalExample "pkgs.pythonPackages"; | |
63 | default = pkgs.python3Packages; | |
64 | defaultText = "pkgs.python3"; | |
65 | example = literalExample "pkgs.python"; | |
66 | default = pkgs.python3; | |
67 | description = "Python package to use"; | |
64 | 68 | }; |
65 | 69 | |
66 | 70 | plugins = { |
67 | 71 | python = { |
68 | enable = mkOption { | |
69 | type = types.bool; | |
72 | enable = mkEnableOption "the python plugin" // { | |
70 | 73 | default = true; |
71 | 74 | }; |
72 | 75 | |
73 | 76 | packages = mkOption { |
74 | 77 | type = types.listOf drvAttr; |
75 | 78 | default = [ ]; |
76 | description = "Attributes or derivations from pythonPackages that scripts might depend on"; | |
79 | description = "Attributes or derivations from python packages that scripts might depend on"; | |
77 | 80 | example = [ "weechat-matrix" ]; |
78 | 81 | }; |
79 | 82 | }; |