1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

Nix's own flake: Dedup and memoize more

- `nixpkgsFor` does all of native, static, cross, and the different stdenvs.

- The main Nix derivation is no longer duplicated for static.

- DRY nixpkgs.lib and lib.genAttrs calls.
This commit is contained in:
John Ericson 2022-03-02 02:40:18 +00:00 committed by zimbatm
parent 9a3f66d9d9
commit d7a4f08d42
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
3 changed files with 112 additions and 184 deletions

View file

@ -30,7 +30,7 @@ This shell also adds `./outputs/bin/nix` to your `$PATH` so you can run `nix` im
To get a shell with one of the other [supported compilation environments](#compilation-environments):
```console
$ nix develop .#clang11Stdenv
$ nix develop .#native-clang11StdenvPackages
```
> **Note**
@ -77,12 +77,12 @@ $ nix-shell
To get a shell with one of the other [supported compilation environments](#compilation-environments):
```console
$ nix-shell -A devShells.x86_64-linux.clang11Stdenv
$ nix-shell -A devShells.x86_64-linux.native-clang11StdenvPackages
```
> **Note**
>
> You can use `ccacheStdenv` to drastically improve rebuild time.
> You can use `native-ccacheStdenvPackages` to drastically improve rebuild time.
> By default, [ccache](https://ccache.dev) keeps artifacts in `~/.cache/ccache/`.
To build Nix itself in this shell: