Skip to content

Commit cfe82c9

Browse files
committed
docs: document feature variation packages
1 parent ac54564 commit cfe82c9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ cargo build
1616
# Regenerate GitHub actions from changed ci.nix
1717
CI_PLATFORM=impure nix run -f https://github.com/arcnmx/ci/archive/v0.7.tar.gz run.gh-actions-generate --arg config ./ci.nix
1818
```
19+
20+
## Package variants (e.g. features)
21+
22+
package.nix supports a `features` parameter. If you define a package with features, you can use the variant in both the outputs and within CI to provide builds with certain features.
23+
```
24+
exampleWithFeatures = pkgs.callPackage ./package.nix {
25+
craneLib = packageCraneLib;
26+
features = [ "lots-of-spaghetti" ];
27+
};
28+
```

0 commit comments

Comments
 (0)