about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-09-05 00:37:17 +0300
committerGitHub <noreply@github.com>2023-09-05 00:37:17 +0300
commit31c9deb4f72b5cf63af4f60a700816e2c293ce8d (patch)
treecb7e699c56dc17ce01101dfeddcf50cddc0de20f /doc
parentd5139e30179237517e09174561b82bdacc1c2a03 (diff)
parent0bffcc3f3cef71004f130a62432cf8615eb7731b (diff)
Merge pull request #218783 from timbertson/stripExcludeExtensions
Diffstat (limited to 'doc')
-rw-r--r--doc/stdenv/stdenv.chapter.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md
index fe0f5daf7a079..4e993e898de28 100644
--- a/doc/stdenv/stdenv.chapter.md
+++ b/doc/stdenv/stdenv.chapter.md
@@ -937,6 +937,28 @@ Like `stripDebugList`, but only applies to packages’ target platform. By defau
 
 Flags passed to the `strip` command applied to the files in the directories listed in `stripDebugList`. Defaults to `-S` (i.e. `--strip-debug`).
 
+##### `stripExclude` {#var-stdenv-stripExclude}
+
+A list of filenames or path patterns to avoid stripping. A file is excluded if its name _or_ path (from the derivation root) matches.
+
+This example prevents all `*.rlib` files from being stripped:
+
+```nix
+stdenv.mkDerivation {
+  # ...
+  stripExclude = [ "*.rlib" ]
+}
+```
+
+This example prevents files within certain paths from being stripped:
+
+```nix
+stdenv.mkDerivation {
+  # ...
+  stripExclude = [ "lib/modules/*/build/* ]
+}
+```
+
 ##### `dontPatchELF` {#var-stdenv-dontPatchELF}
 
 If set, the `patchelf` command is not used to remove unnecessary `RPATH` entries. Only applies to Linux.