From 0bffcc3f3cef71004f130a62432cf8615eb7731b Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Tue, 28 Feb 2023 21:28:41 +1100 Subject: setup-hooks/strip: add stripExclude --- doc/stdenv/stdenv.chapter.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index 56843467fa4a6..c466e375b1af7 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. -- cgit 1.4.1