File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,14 @@ ourArgs:
138
138
}
139
139
'' ;
140
140
} ;
141
- devshell = lib . mkOption {
141
+ devshell . name = lib . mkOption {
142
+ type = types . nullOr types . str ;
143
+ default = null ;
144
+ description = ''
145
+ Name of devshell to add update-cargo-nix command to.
146
+ '' ;
147
+ } ;
148
+ devshell . category = lib . mkOption {
142
149
type = types . nullOr types . str ;
143
150
default = null ;
144
151
description = ''
@@ -163,10 +170,10 @@ ourArgs:
163
170
config = lib . mkMerge [
164
171
( lib . mkIf ( options ? devshells && cfg . devshell != null ) (
165
172
( lib . optionalAttrs ( options ? devshells ) {
166
- devshells . ${ cfg . devshell } = {
173
+ devshells . ${ cfg . devshell . name } = {
167
174
commands = [
168
175
{
169
- category = "development" ;
176
+ category = lib . mkIf ( cfg . devshell . category != null ) cfg . devshell . category ;
170
177
name = "update-cargo-nix" ;
171
178
help = "Update Cargo.nix" ;
172
179
command = "${ lib . getExe crate2nix } generate" ;
You can’t perform that action at this time.
0 commit comments