Skip to content

Commit

Permalink
Merge pull request #1657 from hercules-ci/doc-defaultText
Browse files Browse the repository at this point in the history
docs: Use defaultText
  • Loading branch information
domenkozar authored Jan 3, 2025
2 parents 8d13e1f + 753cb88 commit d67d04a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/reference/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -35913,11 +35913,12 @@ outputOf (attribute set)

```
{
git = pkgs.git;
foo = {
ncdu = <derivation ncdu-2.3>;
ncdu = pkgs.ncdu;
};
git = <derivation git-2.44.0>;
}

```

*Declared by:*
Expand Down Expand Up @@ -65487,7 +65488,7 @@ package


*Default:*
` <derivation bash-5.2p26> `
` pkgs.bash `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/scripts.nix](https://github.com/cachix/devenv/blob/main/src/modules/scripts.nix)
Expand All @@ -65508,7 +65509,7 @@ string


*Default:*
` "bash" `
` config.package.pname `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/scripts.nix](https://github.com/cachix/devenv/blob/main/src/modules/scripts.nix)
Expand Down Expand Up @@ -72461,7 +72462,7 @@ package


*Default:*
` <derivation stdenv-linux> `
` pkgs.stdenv `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/top-level.nix](https://github.com/cachix/devenv/blob/main/src/modules/top-level.nix)
Expand Down Expand Up @@ -72498,7 +72499,7 @@ package


*Default:*
` <derivation bash-5.2p26> `
` pkgs.bash `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/tasks.nix](https://github.com/cachix/devenv/blob/main/src/modules/tasks.nix)
Expand Down Expand Up @@ -72561,7 +72562,7 @@ string


*Default:*
` "bash" `
` config.package.pname `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/tasks.nix](https://github.com/cachix/devenv/blob/main/src/modules/tasks.nix)
Expand Down
8 changes: 8 additions & 0 deletions src/modules/outputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
ncdu = pkgs.ncdu;
};
};
defaultText = lib.literalExpression ''
{
git = pkgs.git;
foo = {
ncdu = pkgs.ncdu;
};
}
'';
description = ''
Nix outputs for `devenv build` consumption.
'';
Expand Down
2 changes: 2 additions & 0 deletions src/modules/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ let
type = types.package;
description = "The package to use to run the script.";
default = pkgs.bash;
defaultText = lib.literalExpression "pkgs.bash";
};
binary = lib.mkOption {
type = types.str;
description = "Override the binary name if it doesn't match package name";
default = config.package.pname;
defaultText = lib.literalExpression "config.package.pname";
};
description = lib.mkOption {
type = types.str;
Expand Down
2 changes: 2 additions & 0 deletions src/modules/tasks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ let
type = types.str;
description = "Override the binary name if it doesn't match package name";
default = config.package.pname;
defaultText = lib.literalExpression "config.package.pname";
};
package = lib.mkOption {
type = types.package;
default = pkgs.bash;
defaultText = lib.literalExpression "pkgs.bash";
description = "Package to install for this task.";
};
command = lib.mkOption {
Expand Down
1 change: 1 addition & 0 deletions src/modules/top-level.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ in
type = types.package;
description = "The stdenv to use for the developer environment.";
default = pkgs.stdenv;
defaultText = lib.literalExpression "pkgs.stdenv";
};

unsetEnvVars = lib.mkOption {
Expand Down

0 comments on commit d67d04a

Please sign in to comment.