libkookie: update base.nix shell to allow for empty userPackages

wip/nixpkgs-raku
Katharina Fey 3 years ago
parent 8f3fdd58ce
commit 9912e355da
Signed by: kookie
GPG Key ID: F972AEEA2887D547
  1. 22
      infra/libkookie/shells/README.md
  2. 2
      infra/libkookie/shells/base.nix

@ -1,4 +1,4 @@
# nix builders
# Development shells
To make development on NixOS slightly less excruciating, libkookie
ships with a set of development shells. These are environments that
@ -12,18 +12,26 @@ other `shell.nix` files.
## How to use
Create a `shell.nix` for a project that you want to include. The tool
`msh` (Make SHell) is available to generate these based on common
defaults. Afterwards both `lorri` and `nix-shell` will be able to
pick up the required environment for development.
Create a `shell.nix` for a project that you want to include (and
optionally `.envrc` for lorri). The tool `msh` (Make SHell) is
available to generate these based on common defaults. Afterwards both
`lorri` and `nix-shell` will be able to pick up the required
environment for development.
```nix
{...}: import <shells/rust> {}
{...}: import <shells/rust/stable> {}
```
The above snippet includes the basic Rust development toolchain. You
can also provide a set of additional packages to install
```nix
{ pkgs, ... }: import <shells/rust/stable> { packages = [ pkgs.hello ]; }
import <shells/rust/stable> {
userPackages = (pkgs: [ pkgs.hello ]);
}
```
You can also include `<shells/rust/nightly>` which will get the latest
nightly compiler with a complete toolchain. This feature is
implemented via the
[oxalica/rust-overlay](https://github.com/oxalica/rust-overlay/).

@ -1,4 +1,4 @@
name: mkBuildInputs: { userPackages }:
name: mkBuildInputs: { userPackages ? _: [] }:
with import <nixpkgs> {};
stdenv.mkDerivation {
inherit name;

Loading…
Cancel
Save