Skip to content

Commit

Permalink
docs: document how to override mkShell/stdenv for devShell (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetkov authored Sep 25, 2024
1 parent d3797a7 commit 5c57ab3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,25 @@ craneLib.devShell {
}
```

Note that it is possible to override the underlying `mkShell` (for example to
customize the build environment further) like so:

```nix
let
moldDevShell = craneLib.devShell.override {
# For example, use the mold linker
mkShell = pkgs.mkShell.override {
stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv;
};
};
in
moldDevShell {
packages = [
# etc...
];
}
```

### `craneLib.downloadCargoPackage`

`downloadCargoPackage :: set -> drv`
Expand Down

0 comments on commit 5c57ab3

Please sign in to comment.