···1717- [ ] Determined the impact on package closure size (by running `nix path-info -S` before and after)
1818- [ ] Ensured that relevant documentation is up to date
1919- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).
2020-2121-###### Notify maintainers
2222-2323-cc @
+16-47
doc/contributing/submitting-changes.xml
···1313 </listitem>
1414 <listitem>
1515 <para>
1616- Fork the repository on GitHub.
1616+ Fork <link xlink:href="https://github.com/nixos/nixpkgs/">the Nixpkgs repository</link> on GitHub.
1717 </para>
1818 </listitem>
1919 <listitem>
···2222 <itemizedlist>
2323 <listitem>
2424 <para>
2525- You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache.
2626- <itemizedlist>
2727- <listitem>
2828- <para>
2929- For example: <command>nixos-version</command> returns <command>15.05.git.0998212 (Dingo)</command>. So you can do:
3030- </para>
3131- </listitem>
3232- </itemizedlist>
2525+ You can make branch from a commit of your local <command>nixos-version</command>. That will help you to avoid additional local compilations. Because you will receive packages from binary cache. For example
3326<screen>
2727+<prompt>$ </prompt>nixos-version --hash
2828+0998212
3429<prompt>$ </prompt>git checkout 0998212
3530<prompt>$ </prompt>git checkout -b 'fix/pkg-name-update'
3631</screen>
···4742 <listitem>
4843 <para>
4944 Make commits of logical units.
5050- <itemizedlist>
5151- <listitem>
5252- <para>
5353- If you removed pkgs, made some major NixOS changes etc., write about them in <command>nixos/doc/manual/release-notes/rl-unstable.xml</command>.
5454- </para>
5555- </listitem>
5656- </itemizedlist>
4545+ </para>
4646+ </listitem>
4747+ <listitem>
4848+ <para>
4949+ If you removed pkgs or made some major NixOS changes, write about it in the release notes for the next stable release. For example <command>nixos/doc/manual/release-notes/rl-2003.xml</command>.
5750 </para>
5851 </listitem>
5952 <listitem>
···178171 </listitem>
179172 <listitem>
180173 <para>
181181- Rebase you branch against current <command>master</command>.
174174+ <link xlink:href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing">Rebase</link> your branch against current <command>master</command>.
182175 </para>
183176 </listitem>
184177 </itemizedlist>
···194187 </listitem>
195188 <listitem>
196189 <para>
197197- Create pull request:
198198- <itemizedlist>
199199- <listitem>
200200- <para>
201201- Write the title in format <command>(pkg-name | nixos/<module>): improvement</command>.
202202- <itemizedlist>
203203- <listitem>
204204- <para>
205205- If you update the pkg, write versions <command>from -> to</command>.
206206- </para>
207207- </listitem>
208208- </itemizedlist>
209209- </para>
210210- </listitem>
211211- <listitem>
212212- <para>
213213- Write in comment if you have tested your patch. Do not rely much on <command>TravisCI</command>.
214214- </para>
215215- </listitem>
216216- <listitem>
217217- <para>
218218- If you make an improvement, write about your motivation.
219219- </para>
220220- </listitem>
221221- <listitem>
222222- <para>
223223- Notify maintainers of the package. For example add to the message: <command>cc @jagajaga @domenkozar</command>.
224224- </para>
225225- </listitem>
226226- </itemizedlist>
190190+ Create the pull request
191191+ </para>
192192+ </listitem>
193193+ <listitem>
194194+ <para>
195195+ Follow <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes">the contribution guidelines</link>.
227196 </para>
228197 </listitem>
229198 </itemizedlist>
+14-15
doc/languages-frameworks/haskell.section.md
···8484nix-env -iA nixos.haskellPackages.cabal-install
8585```
86868787-Our current default compiler is GHC 7.10.x and the `haskellPackages` set
8888-contains packages built with that particular version. Nixpkgs contains the
8989-latest major release of every GHC since 6.10.4, however, and there is a whole
9090-family of package sets available that defines Hackage packages built with each
9191-of those compilers, too:
8787+Our current default compiler is GHC 8.6.x and the `haskellPackages` set
8888+contains packages built with that particular version. Nixpkgs contains the last
8989+three major releases of GHC and there is a whole family of package sets
9090+available that defines Hackage packages built with each of those compilers,
9191+too:
9292```shell
9393-nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc6123
9494-nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc763
9393+nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc844
9494+nix-env -f "<nixpkgs>" -qaP -A haskell.packages.ghc882
9595```
96969797The name `haskellPackages` is really just a synonym for
9898-`haskell.packages.ghc7102`, because we prefer that package set internally and
9898+`haskell.packages.ghc865`, because we prefer that package set internally and
9999recommend it to our users as their default choice, but ultimately you are free
100100to compile your Haskell packages with any GHC version you please. The following
101101command displays the complete list of available compilers:
102102```
103103$ nix-env -f "<nixpkgs>" -qaP -A haskell.compiler
104104-haskell.compiler.ghc822 ghc-8.2.2
105105-haskell.compiler.integer-simple.ghc822 ghc-8.2.2
104104+haskell.compiler.ghc8101 ghc-8.10.0.20191210
105105+haskell.compiler.integer-simple.ghc8101 ghc-8.10.0.20191210
106106+haskell.compiler.ghcHEAD ghc-8.10.20191119
107107+haskell.compiler.integer-simple.ghcHEAD ghc-8.10.20191119
106108haskell.compiler.ghc822Binary ghc-8.2.2-binary
107109haskell.compiler.ghc844 ghc-8.4.4
108110haskell.compiler.ghc863Binary ghc-8.6.3-binary
109109-haskell.compiler.ghc864 ghc-8.6.4
110110-haskell.compiler.integer-simple.ghc864 ghc-8.6.4
111111haskell.compiler.ghc865 ghc-8.6.5
112112haskell.compiler.integer-simple.ghc865 ghc-8.6.5
113113haskell.compiler.ghc881 ghc-8.8.1
114114haskell.compiler.integer-simple.ghc881 ghc-8.8.1
115115-haskell.compiler.ghcHEAD ghc-8.9.20190601
116116-haskell.compiler.integer-simple.ghcHEAD ghc-8.9.20190601
117117-haskell.compiler.ghcjs84 ghcjs-8.4.0.1
115115+haskell.compiler.ghc882 ghc-8.8.1.20191211
116116+haskell.compiler.integer-simple.ghc882 ghc-8.8.1.20191211
118117haskell.compiler.ghcjs ghcjs-8.6.0.1
119118```
120119
···5959 };
6060 };
61616262- closed = closeModules (modules ++ [ internalModule ]) ({ inherit config options lib; } // specialArgs);
6262+ collected = collectModules
6363+ (specialArgs.modulesPath or "")
6464+ (modules ++ [ internalModule ])
6565+ ({ inherit config options lib; } // specialArgs);
63666464- options = mergeModules prefix (reverseList (filterModules (specialArgs.modulesPath or "") closed));
6767+ options = mergeModules prefix (reverseList collected);
65686669 # Traverse options and extract the option values into the final
6770 # config set. At the same time, check whether all option
···8790 result = { inherit options config; };
8891 in result;
89929393+ # collectModules :: (modulesPath: String) -> (modules: [ Module ]) -> (args: Attrs) -> [ Module ]
9494+ #
9595+ # Collects all modules recursively through `import` statements, filtering out
9696+ # all modules in disabledModules.
9797+ collectModules = let
90989191- # Filter disabled modules. Modules can be disabled allowing
9292- # their implementation to be replaced.
9393- filterModules = modulesPath: modules:
9494- let
9595- moduleKey = m: if isString m then toString modulesPath + "/" + m else toString m;
9696- disabledKeys = map moduleKey (concatMap (m: m.disabledModules) modules);
9797- in
9898- filter (m: !(elem m.key disabledKeys)) modules;
9999+ # Like unifyModuleSyntax, but also imports paths and calls functions if necessary
100100+ loadModule = args: fallbackFile: fallbackKey: m:
101101+ if isFunction m || isAttrs m then
102102+ unifyModuleSyntax fallbackFile fallbackKey (applyIfFunction fallbackKey m args)
103103+ else unifyModuleSyntax (toString m) (toString m) (applyIfFunction (toString m) (import m) args);
104104+105105+ /*
106106+ Collects all modules recursively into the form
99107100100- /* Close a set of modules under the ‘imports’ relation. */
101101- closeModules = modules: args:
102102- let
103103- toClosureList = file: parentKey: imap1 (n: x:
104104- if isAttrs x || isFunction x then
105105- let key = "${parentKey}:anon-${toString n}"; in
106106- unifyModuleSyntax file key (applyIfFunction key x args)
107107- else
108108- let file = toString x; key = toString x; in
109109- unifyModuleSyntax file key (applyIfFunction key (import x) args));
110110- in
111111- builtins.genericClosure {
112112- startSet = toClosureList unknownModule "" modules;
113113- operator = m: toClosureList m._file m.key m.imports;
114114- };
108108+ {
109109+ disabled = [ <list of disabled modules> ];
110110+ # All modules of the main module list
111111+ modules = [
112112+ {
113113+ key = <key1>;
114114+ module = <module for key1>;
115115+ # All modules imported by the module for key1
116116+ modules = [
117117+ {
118118+ key = <key1-1>;
119119+ module = <module for key1-1>;
120120+ # All modules imported by the module for key1-1
121121+ modules = [ ... ];
122122+ }
123123+ ...
124124+ ];
125125+ }
126126+ ...
127127+ ];
128128+ }
129129+ */
130130+ collectStructuredModules =
131131+ let
132132+ collectResults = modules: {
133133+ disabled = concatLists (catAttrs "disabled" modules);
134134+ inherit modules;
135135+ };
136136+ in parentFile: parentKey: initialModules: args: collectResults (imap1 (n: x:
137137+ let
138138+ module = loadModule args parentFile "${parentKey}:anon-${toString n}" x;
139139+ collectedImports = collectStructuredModules module._file module.key module.imports args;
140140+ in {
141141+ key = module.key;
142142+ module = module;
143143+ modules = collectedImports.modules;
144144+ disabled = module.disabledModules ++ collectedImports.disabled;
145145+ }) initialModules);
146146+147147+ # filterModules :: String -> { disabled, modules } -> [ Module ]
148148+ #
149149+ # Filters a structure as emitted by collectStructuredModules by removing all disabled
150150+ # modules recursively. It returns the final list of unique-by-key modules
151151+ filterModules = modulesPath: { disabled, modules }:
152152+ let
153153+ moduleKey = m: if isString m then toString modulesPath + "/" + m else toString m;
154154+ disabledKeys = map moduleKey disabled;
155155+ keyFilter = filter (attrs: ! elem attrs.key disabledKeys);
156156+ in map (attrs: attrs.module) (builtins.genericClosure {
157157+ startSet = keyFilter modules;
158158+ operator = attrs: keyFilter attrs.modules;
159159+ });
160160+161161+ in modulesPath: initialModules: args:
162162+ filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args);
115163116164 /* Massage a module into canonical form, that is, a set consisting
117165 of ‘options’, ‘config’ and ‘imports’ attributes. */
+10-1
lib/tests/modules.sh
···1212 local attr=$1
1313 shift;
1414 local script="import ./default.nix { modules = [ $@ ];}"
1515- nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace
1515+ nix-instantiate --timeout 1 -E "$script" -A "$attr" --eval-only --show-trace --read-write-mode
1616}
17171818reportFailure() {
···176176## Paths should be allowed as values and work as expected
177177# Temporarily disabled until https://github.com/NixOS/nixpkgs/pull/76861
178178#checkConfigOutput "true" config.submodule.enable ./declare-submoduleWith-path.nix
179179+180180+# Check that disabledModules works recursively and correctly
181181+checkConfigOutput "true" config.enable ./disable-recursive/main.nix
182182+checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-foo.nix}
183183+checkConfigOutput "true" config.enable ./disable-recursive/{main.nix,disable-bar.nix}
184184+checkConfigError 'The option .* defined in .* does not exist' config.enable ./disable-recursive/{main.nix,disable-foo.nix,disable-bar.nix}
185185+186186+# Check that imports can depend on derivations
187187+checkConfigOutput "true" config.enable ./import-from-store.nix
179188180189cat <<EOF
181190====== module tests ======
···66 <title>Replace Modules</title>
7788 <para>
99- Modules that are imported can also be disabled. The option declarations and
1010- config implementation of a disabled module will be ignored, allowing another
99+ Modules that are imported can also be disabled. The option declarations,
1010+ config implementation and the imports of a disabled module will be ignored, allowing another
1111 to take it's place. This can be used to import a set of modules from another
1212 channel while keeping the rest of the system on a stable release.
1313 </para>
···373373# unfortunately we can't just set this to `false` when we do not want it.
374374# See https://github.com/NixOS/nixpkgs/issues/77289 for more details
375375lib.optionalAttrs (lib.versionAtLeast ffversion "72") {
376376+ # Ideally we would figure out how to tell the build system to not
377377+ # care about changed hashes as we are already doing that when we
378378+ # fetch the sources. Any further modifications of the source tree
379379+ # is on purpose by some of our tool (or by accident and a bug?).
376380 dontFixLibtool = true;
381381+382382+ # on aarch64 this is also required
383383+ dontUpdateAutotoolsGnuConfigScripts = true;
377384})
···22# Do not edit!
3344{
55- version = "0.100.3";
55+ version = "0.103.6";
66 components = {
77 "abode" = ps: with ps; [ ];
88 "acer_projector" = ps: with ps; [ pyserial ];
···1111 "ads" = ps: with ps; [ ];
1212 "aftership" = ps: with ps; [ ];
1313 "air_quality" = ps: with ps; [ ];
1414+ "airly" = ps: with ps; [ ];
1415 "airvisual" = ps: with ps; [ pyairvisual ];
1516 "aladdin_connect" = ps: with ps; [ ];
1617 "alarm_control_panel" = ps: with ps; [ ];
···1819 "alarmdotcom" = ps: with ps; [ ];
1920 "alert" = ps: with ps; [ ];
2021 "alexa" = ps: with ps; [ aiohttp-cors ];
2222+ "almond" = ps: with ps; [ aiohttp-cors ];
2123 "alpha_vantage" = ps: with ps; [ ];
2224 "amazon_polly" = ps: with ps; [ boto3 ];
2325 "ambiclimate" = ps: with ps; [ ];
···2830 "androidtv" = ps: with ps; [ ];
2931 "anel_pwrctrl" = ps: with ps; [ ];
3032 "anthemav" = ps: with ps; [ ];
3131- "apache_kafka" = ps: with ps; [ ];
3333+ "apache_kafka" = ps: with ps; [ aiokafka ];
3234 "apcupsd" = ps: with ps; [ ];
3335 "api" = ps: with ps; [ aiohttp-cors ];
3436 "apns" = ps: with ps; [ ];
3537 "apple_tv" = ps: with ps; [ pyatv ];
3838+ "apprise" = ps: with ps; [ apprise ];
3639 "aprs" = ps: with ps; [ ];
3740 "aqualogic" = ps: with ps; [ ];
3841 "aquostv" = ps: with ps; [ ];
···4548 "asterisk_cdr" = ps: with ps; [ ];
4649 "asterisk_mbox" = ps: with ps; [ ];
4750 "asuswrt" = ps: with ps; [ ];
5151+ "aten_pe" = ps: with ps; [ ];
4852 "atome" = ps: with ps; [ ];
4953 "august" = ps: with ps; [ ];
5054 "aurora" = ps: with ps; [ ];
···5862 "aws" = ps: with ps; [ ];
5963 "axis" = ps: with ps; [ ];
6064 "azure_event_hub" = ps: with ps; [ ];
6565+ "azure_service_bus" = ps: with ps; [ azure-servicebus ];
6166 "baidu" = ps: with ps; [ ];
6267 "bayesian" = ps: with ps; [ ];
6368 "bbb_gpio" = ps: with ps; [ ];
···105110 "clicksend" = ps: with ps; [ ];
106111 "clicksend_tts" = ps: with ps; [ ];
107112 "climate" = ps: with ps; [ ];
108108- "cloud" = ps: with ps; [ aiohttp-cors ];
113113+ "cloud" = ps: with ps; [ aiohttp-cors hass-nabucasa ];
109114 "cloudflare" = ps: with ps; [ ];
110115 "cmus" = ps: with ps; [ ];
111116 "co2signal" = ps: with ps; [ ];
···134139 "deconz" = ps: with ps; [ ];
135140 "decora" = ps: with ps; [ ];
136141 "decora_wifi" = ps: with ps; [ ];
137137- "default_config" = ps: with ps; [ pynacl aiohttp-cors distro netdisco sqlalchemy zeroconf ];
142142+ "default_config" = ps: with ps; [ pynacl aiohttp-cors defusedxml distro hass-nabucasa netdisco sqlalchemy zeroconf ];
138143 "delijn" = ps: with ps; [ ];
139144 "deluge" = ps: with ps; [ deluge-client ];
140145 "demo" = ps: with ps; [ aiohttp-cors ];
···158163 "dlna_dmr" = ps: with ps; [ ];
159164 "dnsip" = ps: with ps; [ aiodns ];
160165 "dominos" = ps: with ps; [ aiohttp-cors ];
161161- "doods" = ps: with ps; [ ];
166166+ "doods" = ps: with ps; [ pillow ];
162167 "doorbird" = ps: with ps; [ ];
163168 "dovado" = ps: with ps; [ ];
164169 "downloader" = ps: with ps; [ ];
165170 "dsmr" = ps: with ps; [ ];
171171+ "dsmr_reader" = ps: with ps; [ aiohttp-cors hbmqtt paho-mqtt ];
166172 "dte_energy_bridge" = ps: with ps; [ ];
167173 "dublin_bus_transport" = ps: with ps; [ ];
168174 "duckdns" = ps: with ps; [ ];
···230236 "flexit" = ps: with ps; [ ];
231237 "flic" = ps: with ps; [ ];
232238 "flock" = ps: with ps; [ ];
239239+ "flume" = ps: with ps; [ ];
233240 "flunearyou" = ps: with ps; [ ];
234241 "flux" = ps: with ps; [ ];
235242 "flux_led" = ps: with ps; [ ];
···264271 "geo_rss_events" = ps: with ps; [ ];
265272 "geofency" = ps: with ps; [ aiohttp-cors ];
266273 "geonetnz_quakes" = ps: with ps; [ ];
274274+ "geonetnz_volcano" = ps: with ps; [ ];
267275 "github" = ps: with ps; [ PyGithub ];
268276 "gitlab_ci" = ps: with ps; [ python-gitlab ];
269277 "gitter" = ps: with ps; [ ];
···290298 "growatt_server" = ps: with ps; [ ];
291299 "gstreamer" = ps: with ps; [ ];
292300 "gtfs" = ps: with ps; [ ];
293293- "gtt" = ps: with ps; [ ];
294301 "habitica" = ps: with ps; [ ];
295302 "hangouts" = ps: with ps; [ ];
296303 "harman_kardon_avr" = ps: with ps; [ ];
···304311 "here_travel_time" = ps: with ps; [ ];
305312 "hikvision" = ps: with ps; [ ];
306313 "hikvisioncam" = ps: with ps; [ ];
307307- "hipchat" = ps: with ps; [ ];
314314+ "hisense_aehw4a1" = ps: with ps; [ ];
308315 "history" = ps: with ps; [ aiohttp-cors sqlalchemy ];
309316 "history_graph" = ps: with ps; [ aiohttp-cors sqlalchemy ];
310317 "history_stats" = ps: with ps; [ aiohttp-cors sqlalchemy ];
···324331 "html5" = ps: with ps; [ aiohttp-cors pywebpush ];
325332 "http" = ps: with ps; [ aiohttp-cors ];
326333 "htu21d" = ps: with ps; [ ];
327327- "huawei_lte" = ps: with ps; [ ];
334334+ "huawei_lte" = ps: with ps; [ stringcase ];
328335 "huawei_router" = ps: with ps; [ ];
329336 "hue" = ps: with ps; [ aiohue ];
330337 "hunterdouglas_powerview" = ps: with ps; [ ];
331338 "hydrawise" = ps: with ps; [ ];
332332- "hydroquebec" = ps: with ps; [ ];
333339 "hyperion" = ps: with ps; [ ];
334340 "ialarm" = ps: with ps; [ ];
335341 "iaqualink" = ps: with ps; [ ];
···339345 "iglo" = ps: with ps; [ ];
340346 "ign_sismologia" = ps: with ps; [ ];
341347 "ihc" = ps: with ps; [ defusedxml ];
342342- "image_processing" = ps: with ps; [ aiohttp-cors pillow ];
348348+ "image_processing" = ps: with ps; [ aiohttp-cors ];
343349 "imap" = ps: with ps; [ ];
344350 "imap_email_content" = ps: with ps; [ ];
345351 "incomfort" = ps: with ps; [ ];
···351357 "input_text" = ps: with ps; [ ];
352358 "insteon" = ps: with ps; [ ];
353359 "integration" = ps: with ps; [ ];
360360+ "intent" = ps: with ps; [ aiohttp-cors ];
354361 "intent_script" = ps: with ps; [ ];
355362 "ios" = ps: with ps; [ aiohttp-cors zeroconf ];
356363 "iota" = ps: with ps; [ ];
···470477 "mqtt_json" = ps: with ps; [ aiohttp-cors hbmqtt paho-mqtt ];
471478 "mqtt_room" = ps: with ps; [ aiohttp-cors hbmqtt paho-mqtt ];
472479 "mqtt_statestream" = ps: with ps; [ aiohttp-cors hbmqtt paho-mqtt ];
480480+ "msteams" = ps: with ps; [ ];
473481 "mvglive" = ps: with ps; [ PyMVGLive ];
474482 "mychevy" = ps: with ps; [ ];
475483 "mycroft" = ps: with ps; [ ];
···538546 "openweathermap" = ps: with ps; [ pyowm ];
539547 "opple" = ps: with ps; [ ];
540548 "orangepi_gpio" = ps: with ps; [ ];
549549+ "oru" = ps: with ps; [ ];
541550 "orvibo" = ps: with ps; [ ];
542551 "osramlightify" = ps: with ps; [ ];
543552 "otp" = ps: with ps; [ pyotp ];
···548557 "pandora" = ps: with ps; [ pexpect ];
549558 "panel_custom" = ps: with ps; [ aiohttp-cors ];
550559 "panel_iframe" = ps: with ps; [ aiohttp-cors ];
560560+ "pcal9535a" = ps: with ps; [ ];
551561 "pencom" = ps: with ps; [ ];
552562 "persistent_notification" = ps: with ps; [ ];
553563 "person" = ps: with ps; [ ];
···572582 "prometheus" = ps: with ps; [ aiohttp-cors prometheus_client ];
573583 "prowl" = ps: with ps; [ ];
574584 "proximity" = ps: with ps; [ ];
585585+ "proxmoxve" = ps: with ps; [ ];
575586 "proxy" = ps: with ps; [ pillow ];
576587 "ps4" = ps: with ps; [ ];
577588 "ptvsd" = ps: with ps; [ ];
···583594 "pushsafer" = ps: with ps; [ ];
584595 "pvoutput" = ps: with ps; [ ];
585596 "pyload" = ps: with ps; [ ];
586586- "python_script" = ps: with ps; [ ];
597597+ "python_script" = ps: with ps; [ restrictedpython ];
587598 "qbittorrent" = ps: with ps; [ ];
588599 "qld_bushfire" = ps: with ps; [ ];
589600 "qnap" = ps: with ps; [ ];
···647658 "serial" = ps: with ps; [ pyserial-asyncio ];
648659 "serial_pm" = ps: with ps; [ ];
649660 "sesame" = ps: with ps; [ ];
650650- "seven_segments" = ps: with ps; [ ];
661661+ "seven_segments" = ps: with ps; [ pillow ];
651662 "seventeentrack" = ps: with ps; [ ];
652663 "shell_command" = ps: with ps; [ ];
653664 "shiftr" = ps: with ps; [ paho-mqtt ];
···658669 "simplepush" = ps: with ps; [ ];
659670 "simplisafe" = ps: with ps; [ ];
660671 "simulated" = ps: with ps; [ ];
672672+ "sinch" = ps: with ps; [ ];
661673 "sisyphus" = ps: with ps; [ ];
662674 "sky_hub" = ps: with ps; [ ];
663675 "skybeacon" = ps: with ps; [ ];
···679691 "socialblade" = ps: with ps; [ ];
680692 "solaredge" = ps: with ps; [ stringcase ];
681693 "solaredge_local" = ps: with ps; [ ];
694694+ "solarlog" = ps: with ps; [ ];
682695 "solax" = ps: with ps; [ ];
683696 "soma" = ps: with ps; [ ];
684684- "somfy" = ps: with ps; [ ];
697697+ "somfy" = ps: with ps; [ aiohttp-cors ];
685698 "somfy_mylink" = ps: with ps; [ ];
686699 "sonarr" = ps: with ps; [ ];
687700 "songpal" = ps: with ps; [ ];
···697710 "spotify" = ps: with ps; [ aiohttp-cors ];
698711 "sql" = ps: with ps; [ sqlalchemy ];
699712 "squeezebox" = ps: with ps; [ ];
700700- "ssdp" = ps: with ps; [ netdisco ];
713713+ "ssdp" = ps: with ps; [ defusedxml netdisco ];
714714+ "starline" = ps: with ps; [ ];
701715 "starlingbank" = ps: with ps; [ ];
702716 "startca" = ps: with ps; [ xmltodict ];
703717 "statistics" = ps: with ps; [ ];
···706720 "stiebel_eltron" = ps: with ps; [ ];
707721 "stream" = ps: with ps; [ aiohttp-cors av ];
708722 "streamlabswater" = ps: with ps; [ ];
709709- "stride" = ps: with ps; [ ];
723723+ "stt" = ps: with ps; [ aiohttp-cors ];
710724 "suez_water" = ps: with ps; [ ];
711725 "sun" = ps: with ps; [ ];
712726 "supervisord" = ps: with ps; [ ];
···735749 "tcp" = ps: with ps; [ ];
736750 "ted5000" = ps: with ps; [ xmltodict ];
737751 "teksavvy" = ps: with ps; [ ];
738738- "telegram" = ps: with ps; [ aiohttp-cors python-telegram-bot ];
739739- "telegram_bot" = ps: with ps; [ aiohttp-cors python-telegram-bot ];
752752+ "telegram" = ps: with ps; [ pysocks aiohttp-cors python-telegram-bot ];
753753+ "telegram_bot" = ps: with ps; [ pysocks aiohttp-cors python-telegram-bot ];
740754 "tellduslive" = ps: with ps; [ ];
741755 "tellstick" = ps: with ps; [ ];
742756 "telnet" = ps: with ps; [ ];
743757 "temper" = ps: with ps; [ ];
744758 "template" = ps: with ps; [ ];
745745- "tensorflow" = ps: with ps; [ numpy protobuf tensorflow ];
759759+ "tensorflow" = ps: with ps; [ numpy pillow protobuf tensorflow ];
746760 "tesla" = ps: with ps; [ ];
747761 "tfiac" = ps: with ps; [ ];
748762 "thermoworks_smoke" = ps: with ps; [ stringcase ];
···789803 "uk_transport" = ps: with ps; [ ];
790804 "unifi" = ps: with ps; [ aiounifi ];
791805 "unifi_direct" = ps: with ps; [ pexpect ];
806806+ "unifiled" = ps: with ps; [ ];
792807 "universal" = ps: with ps; [ ];
793808 "upc_connect" = ps: with ps; [ ];
794809 "upcloud" = ps: with ps; [ ];
···808823 "venstar" = ps: with ps; [ ];
809824 "vera" = ps: with ps; [ ];
810825 "verisure" = ps: with ps; [ ];
826826+ "versasense" = ps: with ps; [ ];
811827 "version" = ps: with ps; [ pyhaversion ];
812828 "vesync" = ps: with ps; [ ];
813829 "viaggiatreno" = ps: with ps; [ ];
···839855 "wink" = ps: with ps; [ ];
840856 "wirelesstag" = ps: with ps; [ ];
841857 "withings" = ps: with ps; [ aiohttp-cors ];
858858+ "wled" = ps: with ps; [ ];
842859 "workday" = ps: with ps; [ holidays ];
843860 "worldclock" = ps: with ps; [ ];
844861 "worldtidesinfo" = ps: with ps; [ ];
+19-52
pkgs/servers/home-assistant/default.nix
···11{ lib, fetchurl, fetchFromGitHub, fetchpatch, python3, protobuf3_6
2233# Look up dependencies of specified components in component-packages.nix
44-, extraComponents ? []
44+, extraComponents ? [ ]
5566# Additional packages to add to propagatedBuildInputs
77, extraPackages ? ps: []
···21212222 defaultOverrides = [
2323 # Override the version of some packages pinned in Home Assistant's setup.py
2424-# (mkOverride "aiohttp" "3.5.4"
2525-# "9c4c83f4fa1938377da32bc2d59379025ceeee8e24b89f72fcbccd8ca22dc9bf")
2626-# (mkOverride "astral" "1.10.1"
2727-# "d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1")
2828-# (mkOverride "async-timeout" "3.0.1"
2929-# "0c3c816a028d47f659d6ff5c745cb2acf1f966da1fe5c19c77a70282b25f4c5f")
3030-# (mkOverride "bcrypt" "3.1.7"
3131-# "0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42")
3232-# (mkOverride "pyjwt" "1.7.1"
3333-# "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96")
3434- (mkOverride "cryptography" "2.7" # TODO for 2.8: Remove the override below
3535- "e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6")
3636- (mkOverride "cryptography_vectors" "2.7" # required by cryptography==2.7
3737- "f12dfb9bd669a68004074cb5b26df6e93ed1a95ebd1a999dff0a840212ff68bc")
3838-# (mkOverride "importlib-metadata" "0.18"
3939-# "cb6ee23b46173539939964df59d3d72c3e0c1b5d54b84f1d8a7e912fe43612db")
4040- (mkOverride "python-slugify" "3.0.4"
4141- "0dv97yi5fq074q5qyqbin09pmi8ixg36caf5nkpw2bqkd8jh6pap")
4242-# (mkOverride "pyyaml" "5.1.1"
4343-# "b4bb4d3f5e232425e25dda21c070ce05168a786ac9eda43768ab7f3ac2770955")
4444-# (mkOverride "requests" "2.22.0"
4545-# "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4")
4646-# (mkOverride "ruamel_yaml" "0.15.97"
4747-# "17dbf6b7362e7aee8494f7a0f5cffd44902a6331fe89ef0853b855a7930ab845")
4848-# (mkOverride "voluptuous" "0.11.5"
4949-# "567a56286ef82a9d7ae0628c5842f65f516abcb496e74f3f59f1d7b28df314ef")
5050-# (mkOverride "voluptuous-serialize" "2.1.0"
5151-# "d30fef4f1aba251414ec0b315df81a06da7bf35201dcfb1f6db5253d738a154f")
5252-5353- # used by auth.mfa_modules.totp
5454- (mkOverride "pyotp" "2.2.7"
5555- "be0ffeabddaa5ee53e7204e7740da842d070cf69168247a3d0c08541b84de602")
56245725 # used by check_config script
5826 # can be unpinned once https://github.com/home-assistant/home-assistant/issues/11917 is resolved
5927 (mkOverride "colorlog" "4.0.2"
6028 "3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42")
61293030+ (mkOverride "pyyaml" "5.1.2"
3131+ "1r5faspz73477hlbjgilw05xsms0glmsa371yqdd26znqsvg1b81")
3232+6233 # required by aioesphomeapi
6334 (self: super: {
6435 protobuf = super.protobuf.override {
6536 protobuf = protobuf3_6;
6637 };
6767- })
6868-6969- (self: super: {
7070- # TODO: Remove this override after updating to cryptography 2.8
7171- cryptography = super.cryptography.overridePythonAttrs (oldAttrs: {
7272- propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ super.asn1crypto ];
7373- patches = [
7474- (fetchpatch {
7575- url = "https://github.com/pyca/cryptography/commit/e575e3d482f976c4a1f3203d63ea0f5007a49a2a.patch";
7676- sha256 = "0vg9prqsizd6gzh5j7lscsfxzxlhz7pacvzhgqmj1vhdhjwbblcp";
7777- })
7878- ];
7979- });
8038 })
81398240 # hass-frontend does not exist in python3.pkgs
···11270 extraBuildInputs = extraPackages py.pkgs;
1137111472 # Don't forget to run parse-requirements.py after updating
115115- hassVersion = "0.100.3";
7373+ hassVersion = "0.103.6";
1167411775in with py.pkgs; buildPythonApplication rec {
11876 pname = "homeassistant";
···12785 owner = "home-assistant";
12886 repo = "home-assistant";
12987 rev = version;
130130- sha256 = "1rrv71h91qjq5sii4wfcdjvrcpid2aci1dwadrcd35363ff0w200";
8888+ sha256 = "1492q4icyhvz30fw5ysrwlnsls4iy5pv62ay3vq1ygcfnlapkqhl";
13189 };
1329013391 propagatedBuildInputs = [
···14098 ] ++ componentBuildInputs ++ extraBuildInputs;
14199142100 checkInputs = [
143143- asynctest pytest pytest-aiohttp requests-mock pydispatcher aiohue
101101+ asynctest pytest pytest-aiohttp requests-mock pydispatcher aiohue netdisco hass-nabucasa
102102+ ];
103103+104104+ patches = [
105105+ # newer importlib-metadata version
106106+ (fetchpatch {
107107+ url = "https://github.com/home-assistant/home-assistant/commit/63c6b803dc2d835d57b97ed833ee5cd8318bf7ae.patch";
108108+ sha256 = "16q3qdnmgsw5415f70zvsv1z63dljp3c9glv06cyj4s6qsl13xdc";
109109+ })
144110 ];
145111146112 postPatch = ''
···151117 '';
152118153119 checkPhase = ''
154154- # The components' dependencies are not included, so they cannot be tested
155155- # test_webhook_create_cloudhook imports hass_nabucasa and is thus excluded
156156- py.test --ignore tests/components -k "not test_webhook_create_cloudhook and not test_webhook_config_flow_registers_webhook"
120120+ # - components' dependencies are not included, so they cannot be tested
121121+ # - test_merge_id_schema requires pyqwikswitch
122122+ # - unclear why test_merge fails: assert merge_log_err.call_count != 0
123123+ py.test --ignore tests/components -k "not test_merge_id_schema and not test_merge"
157124 # Some basic components should be tested however
158125 py.test \
159126 tests/components/{api,config,configurator,demo,discovery,frontend,group,history,history_graph} \
+2-2
pkgs/servers/home-assistant/frontend.nix
···44 # the frontend version corresponding to a specific home-assistant version can be found here
55 # https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/frontend/manifest.json
66 pname = "home-assistant-frontend";
77- version = "20190919.0";
77+ version = "20200108.0";
8899 src = fetchPypi {
1010 inherit pname version;
1111- sha256 = "1xdw8fj4njc3sf15mlyiwigrwf89xsz4r2dsv6zs5fnl512r439a";
1111+ sha256 = "1h6fgkx8fffzs829893gjbh0wbjgxjzz2ca64v8r5sb938bfayg8";
1212 };
13131414 # no Python tests implemented
+9-1
pkgs/servers/home-assistant/parse-requirements.py
···105105build_inputs = {}
106106for component in sorted(components.keys()):
107107 attr_paths = []
108108- for req in sorted(get_reqs(components, component)):
108108+ missing_reqs = []
109109+ reqs = sorted(get_reqs(components, component))
110110+ for req in reqs:
109111 # Some requirements are specified by url, e.g. https://example.org/foobar#xyz==1.0.0
110112 # Therefore, if there's a "#" in the line, only take the part after it
111113 req = req[req.find('#') + 1:]
···114116 if attr_path is not None:
115117 # Add attribute path without "python3Packages." prefix
116118 attr_paths.append(attr_path[len(PKG_SET + '.'):])
119119+ else:
120120+ missing_reqs.append(name)
117121 else:
118122 build_inputs[component] = attr_paths
123123+ n_diff = len(reqs) > len(build_inputs[component])
124124+ if n_diff > 0:
125125+ print("Component {} is missing {} dependencies".format(component, n_diff))
126126+ print("missing requirements: {}".format(missing_reqs))
119127120128with open(os.path.dirname(sys.argv[0]) + '/component-packages.nix', 'w') as f:
121129 f.write('# Generated by parse-requirements.py\n')
···3030 pluginName = "analysis-lemmagen";
3131 version = esVersion;
3232 src = fetchurl {
3333- url = "https://github.com/vhyza/${pluginName}/releases/download/v${version}/${pluginName}-${version}-plugin.zip";
3333+ url = "https://github.com/vhyza/elasticsearch-${pluginName}/releases/download/v${version}/elasticsearch-${pluginName}-${version}-plugin.zip";
3434 sha256 =
3535- if version == "7.3.1" then "1nb82z6s94mzdx1srb1pwj7cpzs8w74njap0xiqn7sg5ylk6adm8"
3535+ if version == "7.5.1" then "0js8b9a9ma797448m3sy92qxbwziix8gkcka7hf17dqrb9k29v61"
3636 else if version == "6.8.3" then "12bshvp01pp2lgwd0cn9l58axg8gdimsh4g9wfllxi1bdpv4cy53"
3737 else throw "unsupported version ${version} for plugin ${pluginName}";
3838 };
···4949 src = fetchurl {
5050 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
5151 sha256 =
5252- if version == "7.3.1" then "1p30by7pqnvj8dcwws51kh9s962c42qwqq07gmj4jl83zxcl8kyl"
5252+ if version == "7.5.1" then "09wl2bpng4xx384xns960rymnm64b5zn2cb1sp25n85pd0isp4p2"
5353 else if version == "6.8.3" then "0pmffz761dqjpvmkl7i7xsyw1iyyspqpddxp89rjsznfc9pak5im"
5454 else throw "unsupported version ${version} for plugin ${pluginName}";
5555 };
···6666 src = fetchurl {
6767 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${version}.zip";
6868 sha256 =
6969- if version == "7.3.1" then "1b9l17zv6582sdcdiabwd293xx5ckc2d3h6smiv6znk5f4dxj7km"
6969+ if version == "7.5.1" then "0hhwxkjlkw1yv5sp6pdn5k1y8bdv4mnmb6nby1z4367mig6rm8v9"
7070 else if version == "6.8.3" then "0kfr4i2rcwinjn31xrc2piicasjanaqcgnbif9xc7lnak2nnzmll"
7171 else throw "unsupported version ${version} for plugin ${pluginName}";
7272 };
···8383 src = fetchurl {
8484 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
8585 sha256 =
8686- if version == "7.3.1" then "1dqd3hd8qa1bsvd1p42k5zcrdmb66d2yspfc7g8nsz89w6b1invg"
8686+ if version == "7.5.1" then "1j1rgbha5lh0a02h55zqc5qn0mvvi16l2m5r8lmaswp97px056v9"
8787 else if version == "6.8.3" then "1mm6hj2m1db68n81rzsvlw6nisflr5ikzk5zv9nmk0z641n5vh1x"
8888 else throw "unsupported version ${version} for plugin ${pluginName}";
8989 };
···100100 src = fetchurl {
101101 url = "https://artifacts.elastic.co/downloads/elasticsearch-plugins/${pluginName}/${pluginName}-${esVersion}.zip";
102102 sha256 =
103103- if version == "7.3.1" then "0kpb1hn2fb4lh6kn96vi7265ign9lwcd0zfc19l4n6fpp8js5lfh"
103103+ if version == "7.5.1" then "15g438zpxrcmsgddwmk3sccy92ha90cyq9c61kcw1q84wfi0a7jl"
104104 else if version == "6.8.3" then "1s2klpvnhpkrk53p64zbga3b66czi7h1a13f58kfn2cn0zfavnbk"
105105 else throw "unsupported version ${version} for plugin ${pluginName}";
106106 };
···117117 pluginName = "search-guard";
118118 version =
119119 # https://docs.search-guard.com/latest/search-guard-versions
120120- if esVersion == "7.3.1" then "${esVersion}-37.0.0"
120120+ if esVersion == "7.5.1" then "${esVersion}-38.0.0"
121121 else if esVersion == "6.8.3" then "${esVersion}-25.5"
122122 else throw "unsupported version ${esVersion} for plugin ${pluginName}";
123123 src = fetchurl {
124124 url = "mirror://maven/com/floragunn/${pluginName}-${majorVersion}/${version}/${pluginName}-${majorVersion}-${version}.zip";
125125 sha256 =
126126- if version == "7.3.1-37.0.0" then "0rb631npr6vykrhln3x6q75xwb0wndvrspwnak0rld5d7pqn1r04"
126126+ if version == "7.5.1-38.0.0" then "1a1wp9wrmz6ji2rnpk0b9jqnp86w0w0z8sb48giyc1gzcy1ra9yh"
127127 else if version == "6.8.3-25.5" then "0a7ys9qinc0fjyka03cx9rv0pm7wnvslk234zv5vrphkrj52s1cb"
128128 else throw "unsupported version ${version} for plugin ${pluginName}";
129129 };