Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2724879621a1
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: db4cdd05cc65
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Dec 18, 2019

  1. home-assistant: Add error output for missing deps

    Print missing dependencies to the console when running the parse
    requirements script. This allows to spot missing packages that could be
    added to nixpkgs
    Scriptkiddi committed Dec 18, 2019

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    2293669 View commit details

Commits on Jan 9, 2020

  1. Merge pull request #75898 from Scriptkiddi/hass_parse_req_error

    home-assistant: Add error output for missing deps
    Mic92 authored Jan 9, 2020

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    db4cdd0 View commit details
Showing with 9 additions and 1 deletion.
  1. +9 −1 pkgs/servers/home-assistant/parse-requirements.py
10 changes: 9 additions & 1 deletion pkgs/servers/home-assistant/parse-requirements.py
Original file line number Diff line number Diff line change
@@ -105,7 +105,9 @@ def name_to_attr_path(req):
build_inputs = {}
for component in sorted(components.keys()):
attr_paths = []
for req in sorted(get_reqs(components, component)):
missing_reqs = []
reqs = sorted(get_reqs(components, component))
for req in reqs:
# Some requirements are specified by url, e.g. https://example.org/foobar#xyz==1.0.0
# Therefore, if there's a "#" in the line, only take the part after it
req = req[req.find('#') + 1:]
@@ -114,8 +116,14 @@ def name_to_attr_path(req):
if attr_path is not None:
# Add attribute path without "python3Packages." prefix
attr_paths.append(attr_path[len(PKG_SET + '.'):])
else:
missing_reqs.append(name)
else:
build_inputs[component] = attr_paths
n_diff = len(reqs) > len(build_inputs[component])
if n_diff > 0:
print("Component {} is missing {} dependencies".format(component, n_diff))
print("missing requirements: {}".format(missing_reqs))

with open(os.path.dirname(sys.argv[0]) + '/component-packages.nix', 'w') as f:
f.write('# Generated by parse-requirements.py\n')