A few thousand Darwin jobs are still pending, but there we're depending on this merge to fix the channel-blocking lz4 failure. https://hydra.nixos.org/eval/1519778?compare=1519770
···21212222 availableComponents = cfg.package.availableComponents;
23232424- # Given component "parentConfig.platform", returns whether config.parentConfig
2525- # is a list containing a set with set.platform == "platform".
2424+ usedPlatforms = config:
2525+ if isAttrs config then
2626+ optional (config ? platform) config.platform
2727+ ++ concatMap usedPlatforms (attrValues config)
2828+ else if isList config then
2929+ concatMap usedPlatforms config
3030+ else [ ];
3131+3232+ # Given a component "platform", looks up whether it is used in the config
3333+ # as `platform = "platform";`.
2634 #
2727- # For example, the component sensor.luftdaten is used as follows:
3535+ # For example, the component mqtt.sensor is used as follows:
2836 # config.sensor = [ {
2929- # platform = "luftdaten";
3737+ # platform = "mqtt";
3038 # ...
3139 # } ];
3232- #
3333- # Beginning with 0.87 Home Assistant is migrating their components to the
3434- # scheme "platform.subComponent", e.g. "hue.light" instead of "light.hue".
3535- # See https://developers.home-assistant.io/blog/2019/02/19/the-great-migration.html.
3636- # Hence, we also check whether we find an entry in the config when interpreting
3737- # the first part of the path as the component.
3838- useComponentPlatform = component:
3939- let
4040- path = splitString "." component;
4141- # old: platform is the last part of path
4242- parentConfig = attrByPath (init path) null cfg.config;
4343- platform = last path;
4444- # new: platform is the first part of the path
4545- parentConfig' = attrByPath (tail path) null cfg.config;
4646- platform' = head path;
4747- in
4848- (isList parentConfig && any (item: item.platform or null == platform) parentConfig)
4949- || (isList parentConfig' && any (item: item.platform or null == platform') parentConfig');
4040+ useComponentPlatform = component: elem component (usedPlatforms cfg.config);
50415142 # Returns whether component is used in config
5243 useComponent = component:
···11-{ callPackage, fetchurl, ... } @ args:
22-33-callPackage ./generic.nix (args // rec {
44- version = "3.6.7";
55-66- src = fetchurl {
77- url = "mirror://gnupg/gnutls/v3.6/gnutls-${version}.tar.xz";
88- sha256 = "1ql8l6l5bxks2pgpwb1602zc0j6ivhpy27hdfc49h8xgbanhjd2v";
99- };
1010-1111- # Skip some tests:
1212- # - pkgconfig: building against the result won't work before installing (3.5.11)
1313- # - fastopen: no idea; it broke between 3.6.2 and 3.6.3 (3437fdde6 in particular)
1414- # - trust-store: default trust store path (/etc/ssl/...) is missing in sandbox (3.5.11)
1515- # - psk-file: no idea; it broke between 3.6.3 and 3.6.4
1616- # Change p11-kit test to use pkg-config to find p11-kit
1717- postPatch = ''
1818- sed '2iexit 77' -i tests/{pkgconfig,fastopen}.sh
1919- sed '/^void doit(void)/,/^{/ s/{/{ exit(77);/' -i tests/{trust-store,psk-file}.c
2020- sed 's:/usr/lib64/pkcs11/ /usr/lib/pkcs11/ /usr/lib/x86_64-linux-gnu/pkcs11/:`pkg-config --variable=p11_module_path p11-kit-1`:' -i tests/p11-kit-trust.sh
2121- '';
2222-})
···44# need pkgconfig so that libshout installs ${out}/lib/pkgconfig/shout.pc
5566stdenv.mkDerivation rec {
77- name = "libshout-2.4.1";
77+ name = "libshout-2.4.2";
8899 src = fetchurl {
1010 url = "http://downloads.xiph.org/releases/libshout/${name}.tar.gz";
1111- sha256 = "0kgjpf8jkgyclw11nilxi8vyjk4s8878x23qyxnvybbgqbgbib7k";
1111+ sha256 = "0qgwarqp2p6jy3zadds6dzj8z1jfb2mbwc3lsdlidf527h0a86ym";
1212 };
13131414 outputs = [ "out" "dev" "doc" ];
+2
pkgs/development/libraries/libuv/default.nix
···1717 "spawn_setuid_fails" "spawn_setgid_fails" "fs_chown" # user namespaces
1818 "getaddrinfo_fail" "getaddrinfo_fail_sync"
1919 "threadpool_multiple_event_loops" # times out on slow machines
2020+ "get_passwd" # passed on NixOS but failed on other Linuxes
2121+ "tcp_writealot" # times out sometimes
2022 ] ++ stdenv.lib.optionals stdenv.isDarwin [
2123 # Sometimes: timeout (no output), failed uv_listen. Someone
2224 # should report these failures to libuv team. There tests should
···184184 VGA_SWITCHEROO = yes; # Hybrid graphics support
185185 DRM_GMA600 = yes;
186186 DRM_GMA3600 = yes;
187187+ DRM_VMWGFX_FBCON = yes;
187188 # necessary for amdgpu polaris support
188189 DRM_AMD_POWERPLAY = whenBetween "4.5" "4.9" yes;
189190 # (experimental) amdgpu support for verde and newer chipsets
+4
pkgs/os-specific/linux/kernel/manual-config.nix
···198198 cp $buildRoot/{.config,Module.symvers} $dev/lib/modules/${modDirVersion}/build
199199 make modules_prepare $makeFlags "''${makeFlagsArray[@]}" O=$dev/lib/modules/${modDirVersion}/build
200200201201+ # For reproducibility, removes accidental leftovers from a `cc1` call
202202+ # from a `try-run` call from the Makefile
203203+ rm -f $dev/lib/modules/${modDirVersion}/build/.[0-9]*.d
204204+201205 # Keep some extra files on some arches (powerpc, aarch64)
202206 for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o; do
203207 if [ -f "$buildRoot/$f" ]; then
···11#! /usr/bin/env nix-shell
22-#! nix-shell -i python3 -p "python3.withPackages (ps: with ps; [ aiohttp astral async-timeout attrs certifi jinja2 pyjwt cryptography pip pytz pyyaml requests ruamel_yaml voluptuous python-slugify ])"
22+#! nix-shell -i python3 -p "python3.withPackages (ps: with ps; [ attrs ])
33#
44# This script downloads Home Assistant's source tarball.
55-# Inside the homeassistant/components directory, each component has an associated .py file,
66-# specifying required packages and other components it depends on:
55+# Inside the homeassistant/components directory, each integration has an associated manifest.json,
66+# specifying required packages and other integrations it depends on:
77#
88-# REQUIREMENTS = [ 'package==1.2.3' ]
99-# DEPENDENCIES = [ 'component' ]
88+# {
99+# "requirements": [ "package==1.2.3" ],
1010+# "dependencies": [ "component" ]
1111+# }
1012#
1111-# By parsing the files, a dictionary mapping component to requirements and dependencies is created.
1313+# By parsing the files, a dictionary mapping integrations to requirements and dependencies is created.
1214# For all of these requirements and the dependencies' requirements,
1313-# Nixpkgs' python3Packages are searched for appropriate names.
1414-# Then, a Nix attribute set mapping component name to dependencies is created.
1515+# nixpkgs' python3Packages are searched for appropriate names.
1616+# Then, a Nix attribute set mapping integration name to dependencies is created.
15171616-from urllib.request import urlopen
1717-import tempfile
1818from io import BytesIO
1919-import tarfile
2020-import importlib
1919+import json
2020+import pathlib
2121+import os
2222+import re
2123import subprocess
2222-import os
2324import sys
2424-import json
2525-import re
2525+import tempfile
2626+import tarfile
2727+from urllib.request import urlopen
26282729COMPONENT_PREFIX = 'homeassistant.components'
2830PKG_SET = 'python3Packages'
···4345def parse_components(version='master'):
4446 components = {}
4547 with tempfile.TemporaryDirectory() as tmp:
4646- with urlopen('https://github.com/home-assistant/home-assistant/archive/{}.tar.gz'.format(version)) as response:
4848+ with urlopen(f'https://github.com/home-assistant/home-assistant/archive/{version}.tar.gz') as response:
4749 tarfile.open(fileobj=BytesIO(response.read())).extractall(tmp)
4850 # Use part of a script from the Home Assistant codebase
4949- sys.path.append(tmp + '/home-assistant-{}'.format(version))
5050- from script.gen_requirements_all import explore_module
5151- for package in explore_module(COMPONENT_PREFIX, True):
5252- # Remove 'homeassistant.components.' prefix
5353- component = package[len(COMPONENT_PREFIX + '.'):]
5454- try:
5555- module = importlib.import_module(package)
5656- components[component] = {}
5757- components[component]['requirements'] = getattr(module, 'REQUIREMENTS', [])
5858- components[component]['dependencies'] = getattr(module, 'DEPENDENCIES', [])
5959- # If there is an ImportError, the imported file is not the main file of the component
6060- except ImportError:
6161- continue
5151+ sys.path.append(os.path.join(tmp, f'home-assistant-{version}'))
5252+ from script.hassfest.model import Integration
5353+ integrations = Integration.load_dir(pathlib.Path(
5454+ os.path.join(tmp, f'home-assistant-{version}', 'homeassistant/components')
5555+ ))
5656+ for domain in sorted(integrations):
5757+ integration = integrations[domain]
5858+ components[domain] = integration.manifest
6259 return components
63606461# Recursively get the requirements of a component and its dependencies
···6161 # Meson does not support using different directories during build and
6262 # for installation like Autotools did with flags passed to make install.
6363 ./fix-install-paths.patch
6464-6565- # Our gobject-introspection patches make the shared library paths absolute
6666- # in the GIR files. When building docs, the library is not yet installed,
6767- # though, so we need to replace the absolute path with a local one during build.
6868- # We are replacing the variables in postPatch since substituteAll does not support
6969- # placeholders.
7070- ./fix-docs-build.patch
7164 ];
72657366 buildInputs = [
···9184 postPatch = ''
9285 patchShebangs ./tools
9386 patchShebangs libnm/generate-setting-docs.py
8787+ '';
94889595- substituteInPlace libnm/meson.build \
9696- --subst-var-by DOCS_LD_PRELOAD "${libredirect}/lib/libredirect.so" \
9797- --subst-var-by DOCS_NIX_REDIRECTS "${placeholder "out"}/lib/libnm.so.0=$PWD/build/libnm/libnm.so.0"
8989+ preBuild = ''
9090+ # Our gobject-introspection patches make the shared library paths absolute
9191+ # in the GIR files. When building docs, the library is not yet installed,
9292+ # though, so we need to replace the absolute path with a local one during build.
9393+ # We are using a symlink that will be overridden during installation.
9494+ mkdir -p ${placeholder "out"}/lib
9595+ ln -s $PWD/libnm/libnm.so.0 ${placeholder "out"}/lib/libnm.so.0
9896 '';
999710098 postInstall = ''