-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var buildCmd = &cobra.Command{ | ||
Use: "build", | ||
Short: "build a derivation or fetch a store path", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(buildCmd).Standalone() | ||
|
||
buildCmd.Flags().Bool("commit-lock-file", false, "Commit changes to the flake's lock file. ") | ||
buildCmd.Flags().Bool("derivation", false, "Operate on the store derivation rather than its outputs. ") | ||
buildCmd.Flags().Bool("dry-run", false, "Show what this command would do without doing it. ") | ||
buildCmd.Flags().String("eval-store", "", "The Nix store to use for evaluations. ") | ||
buildCmd.Flags().String("expr", "", "Interpret installables as attribute paths relative to the Nix expression expr. ") | ||
buildCmd.Flags().StringP("file", "f", "", "Interpret installables as attribute paths relative to the Nix expression stored in file.") | ||
buildCmd.Flags().Bool("impure", false, "Allow access to mutable paths and repositories. ") | ||
buildCmd.Flags().BoolP("include", "I", false, "Add path to the list of locations used to look up <...> file names. ") | ||
buildCmd.Flags().String("inputs-from", "", "Use the inputs of the specified flake as registry entries. ") | ||
buildCmd.Flags().Bool("json", false, "Produce output in JSON format, suitable for consumption by another program. ") | ||
buildCmd.Flags().Bool("no-link", false, "Do not create symlinks to the build results. ") | ||
buildCmd.Flags().Bool("no-registries", false, "Don't allow lookups in the flake registries.") | ||
buildCmd.Flags().Bool("no-write-lock-file", false, "Do not write the flake's newly generated lock file. ") | ||
buildCmd.Flags().StringP("out-link", "o", "", "[0m as prefix for the symlinks to the build results. It defaults to result. ") | ||
buildCmd.Flags().String("profile", "", "The profile to update. ") | ||
buildCmd.Flags().Bool("rebuild", false, "Rebuild an already built package and compare the result to the existing store paths. ") | ||
buildCmd.Flags().String("update-input", "", "Update a specific flake input (ignoring its previous entry in the lock file). ") | ||
rootCmd.AddCommand(buildCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var rootCmd = &cobra.Command{ | ||
Use: "nix", | ||
Short: "a tool for reproducible and declarative configuration management", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func Execute() error { | ||
return rootCmd.Execute() | ||
} | ||
func init() { | ||
carapace.Gen(rootCmd).Standalone() | ||
|
||
rootCmd.Flags().Bool("accept-flake-config", false, "Enable the accept-flake-config setting. ") | ||
rootCmd.Flags().String("access-tokens", "", "Set the access-tokens setting. ") | ||
rootCmd.Flags().Bool("allow-dirty", false, "Enable the allow-dirty setting. ") | ||
rootCmd.Flags().Bool("allow-import-from-derivation", false, "Enable the allow-import-from-derivation setting. ") | ||
rootCmd.Flags().Bool("allow-new-privileges", false, "Enable the allow-new-privileges setting. ") | ||
rootCmd.Flags().Bool("allow-symlinked-store", false, "Enable the allow-symlinked-store setting. ") | ||
rootCmd.Flags().Bool("allow-unsafe-native-code-during-evaluation", false, "Enable the allow-unsafe-native-code-during-evaluation setting. ") | ||
rootCmd.Flags().String("allowed-impure-host-deps", "", "Set the allowed-impure-host-deps setting. ") | ||
rootCmd.Flags().String("allowed-uris", "", "Set the allowed-uris setting. ") | ||
rootCmd.Flags().String("allowed-users", "", "Set the allowed-users setting. ") | ||
rootCmd.Flags().Bool("auto-optimise-store", false, "Enable the auto-optimise-store setting. ") | ||
rootCmd.Flags().String("bash-prompt", "", "Set the bash-prompt setting. ") | ||
rootCmd.Flags().String("bash-prompt-suffix", "", "Set the bash-prompt-suffix setting. ") | ||
rootCmd.Flags().String("build-hook", "", "Set the build-hook setting. ") | ||
rootCmd.Flags().String("build-poll-interval", "", "Set the build-poll-interval setting. ") | ||
rootCmd.Flags().Bool("debug", false, "Set the logging verbosity level to 'debug'. ") | ||
rootCmd.Flags().Bool("help", false, "Show usage information. ") | ||
rootCmd.Flags().String("log-format", "", "Set the format of log output; one of raw, internal-json, bar or bar-with-logs. ") | ||
rootCmd.Flags().Bool("offline", false, "Disable substituters and consider all previously downloaded files up-to-date. ") | ||
rootCmd.Flags().BoolP("print-build-logs", "L", false, "Print full build logs on standard error. ") | ||
rootCmd.Flags().Bool("quiet", false, "Decrease the logging verbosity level. ") | ||
rootCmd.Flags().Bool("refresh", false, "Consider all previously downloaded files out-of-date. ") | ||
rootCmd.Flags().String("secret-key-files", "", "Set the secret-key-files setting. ") | ||
rootCmd.Flags().Bool("show-trace", false, "Enable the show-trace setting. ") | ||
rootCmd.Flags().String("stalled-download-timeout", "", "Set the stalled-download-timeout setting. ") | ||
rootCmd.Flags().String("store", "", "Set the store setting. ") | ||
rootCmd.Flags().Bool("substitute", false, "Enable the substitute setting. ") | ||
rootCmd.Flags().String("substituters", "", "Set the substituters setting. ") | ||
rootCmd.Flags().Bool("sync-before-registering", false, "Enable the sync-before-registering setting. ") | ||
rootCmd.Flags().String("system", "", "Set the system setting. ") | ||
rootCmd.Flags().String("system-features", "", "Set the system-features setting. ") | ||
rootCmd.Flags().String("tarball-ttl", "", "Set the tarball-ttl setting. ") | ||
rootCmd.Flags().String("timeout", "", "Set the timeout setting. ") | ||
rootCmd.Flags().Bool("trace-function-calls", false, "Enable the trace-function-calls setting. ") | ||
rootCmd.Flags().String("trusted-public-keys", "", "Set the trusted-public-keys setting. ") | ||
rootCmd.Flags().String("trusted-substituters", "", "Set the trusted-substituters setting. ") | ||
rootCmd.Flags().String("trusted-users", "", "Set the trusted-users setting. ") | ||
rootCmd.Flags().Bool("use-case-hack", false, "Enable the use-case-hack setting. ") | ||
rootCmd.Flags().Bool("use-registries", false, "Enable the use-registries setting. ") | ||
rootCmd.Flags().Bool("use-sqlite-wal", false, "Enable the use-sqlite-wal setting. ") | ||
rootCmd.Flags().String("user-agent-suffix", "", "Set the user-agent-suffix setting. ") | ||
rootCmd.Flags().BoolP("verbose", "v", false, "Increase the logging verbosity level. ") | ||
rootCmd.Flags().Bool("version", false, "Show version information. ") | ||
rootCmd.Flags().Bool("warn-dirty", false, "Enable the warn-dirty setting. ") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "github.com/rsteube/carapace-bin/completers/nix_completer/cmd" | ||
|
||
func main() { | ||
cmd.Execute() | ||
} |