···513513514514- `services.bitcoind` now properly respects the `enable` option.
515515516516+- The Home Assistant module now offers support for installing custom components and lovelace modules. Available at [`services.home-assistant.customComponents`](#opt-services.home-assistant.customComponents) and [`services.home-assistant.customLovelaceModules`](#opt-services.home-assistant.customLovelaceModules).
517517+516518## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}
517519518520- The use of `sourceRoot = "source";`, `sourceRoot = "source/subdir";`, and similar lines in package derivations using the default `unpackPhase` is deprecated as it requires `unpackPhase` to always produce a directory named "source". Use `sourceRoot = src.name`, `sourceRoot = "${src.name}/subdir";`, or `setSourceRoot = "sourceRoot=$(echo */subdir)";` or similar instead.
···11+# Packaging guidelines
22+33+## buildHomeAssistantComponent
44+55+Custom components should be packaged using the
66+ `buildHomeAssistantComponent` function, that is provided at top-level.
77+It builds upon `buildPythonPackage` but uses a custom install and check
88+phase.
99+1010+Python runtime dependencies can be directly consumed as unqualified
1111+function arguments. Pass them into `propagatedBuildInputs`, for them to
1212+be available to Home Assistant.
1313+1414+Out-of-tree components need to use python packages from
1515+`home-assistant.python.pkgs` as to not introduce conflicting package
1616+versions into the Python environment.
1717+1818+1919+**Example Boilerplate:**
2020+2121+```nix
2222+{ lib
2323+, buildHomeAssistantcomponent
2424+, fetchFromGitHub
2525+}:
2626+2727+buildHomeAssistantComponent {
2828+ # pname, version
2929+3030+ src = fetchFromGithub {
3131+ # owner, repo, rev, hash
3232+ };
3333+3434+ propagatedBuildInputs = [
3535+ # python requirements, as specified in manifest.json
3636+ ];
3737+3838+ meta = with lib; {
3939+ # changelog, description, homepage, license, maintainers
4040+ }
4141+}
4242+4343+## Package name normalization
4444+4545+Apply the same normalization rules as defined for python packages in
4646+[PEP503](https://peps.python.org/pep-0503/#normalized-names).
4747+The name should be lowercased and dots, underlines or multiple
4848+dashes should all be replaced by a single dash.
4949+5050+## Manifest check
5151+5252+The `buildHomeAssistantComponent` builder uses a hook to check whether
5353+the dependencies specified in the `manifest.json` are present and
5454+inside the specified version range.
5555+5656+There shouldn't be a need to disable this hook, but you can set
5757+`dontCheckManifest` to `true` in the derivation to achieve that.
···11+# Packaging guidelines
22+33+## Entrypoint
44+55+Every lovelace module has an entrypoint in the form of a `.js` file. By
66+default the nixos module will try to load `${pname}.js` when a module is
77+configured.
88+99+The entrypoint used can be overridden in `passthru` like this:
1010+1111+```nix
1212+passthru.entrypoint = "demo-card-bundle.js";
1313+```