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
163 changed files
with
2,970 additions
and
897 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
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
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 |
---|---|---|
@@ -1,9 +1,22 @@ | ||
.docbook .xref img[src^=images\/callouts\/], | ||
.screen img, | ||
.programlisting img { | ||
.programlisting img, | ||
.literallayout img, | ||
.synopsis img { | ||
width: 1em; | ||
} | ||
|
||
.calloutlist img { | ||
width: 1.5em; | ||
} | ||
|
||
.prompt, | ||
.screen img, | ||
.programlisting img, | ||
.literallayout img, | ||
.synopsis img { | ||
-moz-user-select: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
} |
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,56 @@ | ||
{ lib }: | ||
|
||
rec { | ||
/* Automatically convert an attribute set to command-line options. | ||
This helps protect against malformed command lines and also to reduce | ||
boilerplate related to command-line construction for simple use cases. | ||
Example: | ||
encodeGNUCommandLine | ||
{ } | ||
{ data = builtins.toJSON { id = 0; }; | ||
X = "PUT"; | ||
retry = 3; | ||
retry-delay = null; | ||
url = [ "https://example.com/foo" "https://example.com/bar" ]; | ||
silent = false; | ||
verbose = true; | ||
}; | ||
=> "'-X' 'PUT' '--data' '{\"id\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'" | ||
*/ | ||
encodeGNUCommandLine = | ||
options: attrs: lib.escapeShellArgs (toGNUCommandLine options attrs); | ||
|
||
toGNUCommandLine = | ||
{ renderKey ? | ||
key: if builtins.stringLength key == 1 then "-${key}" else "--${key}" | ||
|
||
, renderOption ? | ||
key: value: | ||
if value == null | ||
then [] | ||
else [ (renderKey key) (builtins.toString value) ] | ||
|
||
, renderBool ? key: value: lib.optional value (renderKey key) | ||
|
||
, renderList ? key: value: lib.concatMap (renderOption key) value | ||
}: | ||
options: | ||
let | ||
render = key: value: | ||
if builtins.isBool value | ||
then renderBool key value | ||
else if builtins.isList value | ||
then renderList key value | ||
else renderOption key value; | ||
|
||
in | ||
builtins.concatLists (lib.mapAttrsToList render options); | ||
} |
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
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
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
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
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
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
Oops, something went wrong.