Commit 65b3bac 1 parent 2681ad5 commit 65b3bac Copy full SHA for 65b3bac
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,17 @@ def _nixpkgs_package_impl(ctx):
49
49
50
50
# If neither repository or path are set, leave empty which will use
51
51
# default value from NIX_PATH.
52
- path = []
53
52
if ctx .attr .repository and ctx .attr .path :
54
53
fail ("'repository' and 'path' fields are mutually exclusive." )
55
- if ctx .attr .repository :
54
+ elif ctx .attr .repository :
56
55
# XXX Another hack: the repository label typically resolves to
57
56
# some top-level package in the external workspace. So we use
58
57
# dirname to get the actual workspace path.
59
58
path = ["-I" , "nixpkgs={0}" .format (ctx .path (ctx .attr .repository ).dirname )]
60
- if ctx .attr .path :
59
+ elif ctx .attr .path :
61
60
path = ["-I" , "nixpkgs={0}" .format (ctx .attr .path )]
61
+ else :
62
+ fail ("""You *must* specify one of 'repository' or 'path'.""" )
62
63
63
64
nix_build_path = ctx .which ("nix-build" )
64
65
if nix_build_path == None :
You can’t perform that action at this time.
0 commit comments