summary refs log tree commit diff
path: root/doc/stdenv
diff options
context:
space:
mode:
authorTim Cuthbertson <tim@gfxmonk.net>2023-02-28 21:28:41 +1100
committerArtturin <Artturin@artturin.com>2023-09-03 20:18:10 +0300
commit0bffcc3f3cef71004f130a62432cf8615eb7731b (patch)
tree6e2cc6255e114f35dd54727df42a7a603b8216de /doc/stdenv
parent074dea1e11c459588b4da209cc487d57e1257539 (diff)
downloadnixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.tar
nixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.tar.gz
nixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.tar.bz2
nixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.tar.lz
nixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.tar.xz
nixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.tar.zst
nixpkgs-0bffcc3f3cef71004f130a62432cf8615eb7731b.zip
setup-hooks/strip: add stripExclude
Diffstat (limited to 'doc/stdenv')
-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 56843467fa4..c466e375b1a 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.