aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolène Rapenne <solene.rapenne@tweag.io>2022-09-23 11:21:19 +0200
committerSolène Rapenne <solene.rapenne@tweag.io>2022-09-23 11:21:19 +0200
commite04b38f789ff2fb3a93f4cf5783b23430e5d2797 (patch)
treeff109e59796467ecb73898b05f9c2fccadb5fce0
parentfbd0a6c6e2e87f6679fe5cabaddaa877cf3e5a90 (diff)
add ccacheStdenv
when using ccache, rebuild time has been measured 89% faster while not slowing the speed of cold builds
-rw-r--r--doc/manual/src/contributing/hacking.md5
-rw-r--r--flake.nix2
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/manual/src/contributing/hacking.md b/doc/manual/src/contributing/hacking.md
index 59ce5cac7..e97b40cdd 100644
--- a/doc/manual/src/contributing/hacking.md
+++ b/doc/manual/src/contributing/hacking.md
@@ -42,7 +42,7 @@ $ nix develop
```
To get a shell with a different compilation environment (e.g. stdenv,
-gccStdenv, clangStdenv, clang11Stdenv):
+gccStdenv, clangStdenv, clang11Stdenv, ccacheStdenv):
```console
$ nix-shell -A devShells.x86_64-linux.clang11StdenvPackages
@@ -54,6 +54,9 @@ or if you have a flake-enabled nix:
$ nix develop .#clang11StdenvPackages
```
+Note: you can use `ccacheStdenv` to drastically improve rebuild
+time. By default, ccache keeps artifacts in `~/.cache/ccache/`.
+
To build Nix itself in this shell:
```console
diff --git a/flake.nix b/flake.nix
index 1b26460e7..5416b9d75 100644
--- a/flake.nix
+++ b/flake.nix
@@ -23,7 +23,7 @@
crossSystems = [ "armv6l-linux" "armv7l-linux" ];
- stdenvs = [ "gccStdenv" "clangStdenv" "clang11Stdenv" "stdenv" "libcxxStdenv" ];
+ stdenvs = [ "gccStdenv" "clangStdenv" "clang11Stdenv" "stdenv" "libcxxStdenv" "ccacheStdenv" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
forAllSystemsAndStdenvs = f: forAllSystems (system: