File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,22 @@ def parse_args(args: list[str]) -> Options:
115
115
help = "Attribute of a subpackage that nix-update should try to update hashes for" ,
116
116
default = None ,
117
117
)
118
+ parser .add_argument (
119
+ "--option" ,
120
+ help = "Nix option to set" ,
121
+ action = "append" ,
122
+ nargs = 2 ,
123
+ metavar = ("name" , "value" ),
124
+ default = [],
125
+ )
118
126
119
127
a = parser .parse_args (args )
128
+ extra_flags = ["--extra-experimental-features" , "flakes nix-command" ]
129
+ if a .system :
130
+ extra_flags .extend (["--system" , a .system ])
131
+ for name , value in a .option :
132
+ extra_flags .extend (["--option" , name , value ])
133
+
120
134
return Options (
121
135
import_path = os .path .realpath (a .file ),
122
136
flake = a .flake ,
@@ -140,8 +154,7 @@ def parse_args(args: list[str]) -> Options:
140
154
system = a .system ,
141
155
generate_lockfile = a .generate_lockfile ,
142
156
lockfile_metadata_path = a .lockfile_metadata_path ,
143
- extra_flags = (["--system" , a .system ] if a .system else [])
144
- + ["--extra-experimental-features" , "flakes nix-command" ],
157
+ extra_flags = extra_flags ,
145
158
)
146
159
147
160
You can’t perform that action at this time.
0 commit comments