From 3c304fd1c9bdb1faafc0060cf9eb46058d000bc0 Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Tue, 7 May 2019 14:02:44 +0200 Subject: [PATCH] Fix out of bound error Some lines from nix-build output does not contains 3 words, leading to out of bound. Closes #79 --- nixpkgs/nixpkgs.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixpkgs/nixpkgs.bzl b/nixpkgs/nixpkgs.bzl index ba5714eaf..007856996 100644 --- a/nixpkgs/nixpkgs.bzl +++ b/nixpkgs/nixpkgs.bzl @@ -174,6 +174,10 @@ def _nixpkgs_package_impl(repository_ctx): for line in exec_result.stderr.splitlines(): line = line.split(sep=' ') + # Interesting lines contains at least 3 words + if len(line) < 3: + continue + # Heuristic: a dependency is something which looks like: # evaluating file FILE # copied source FILE