about summary refs log tree commit diff
path: root/nixpkgs/doc/stdenv
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-09-15 07:58:52 +0000
committerAlyssa Ross <hi@alyssa.is>2023-09-15 07:58:52 +0000
commit9d1daa60832979d5d361dfdac136fb9e5a1af2c5 (patch)
tree5192dd85903cb092cf7dff0e3403387b3b683d84 /nixpkgs/doc/stdenv
parent67cdfc7d42f721bf85814af5a0095fb9f9ea455d (diff)
parentf2ea252d23ebc9a5336bf6a61e0644921f64e67c (diff)
downloadnixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.gz
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.bz2
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.lz
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.xz
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.tar.zst
nixlib-9d1daa60832979d5d361dfdac136fb9e5a1af2c5.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/doc/stdenv')
-rw-r--r--nixpkgs/doc/stdenv/stdenv.chapter.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/nixpkgs/doc/stdenv/stdenv.chapter.md b/nixpkgs/doc/stdenv/stdenv.chapter.md
index fe0f5daf7a07..4e993e898de2 100644
--- a/nixpkgs/doc/stdenv/stdenv.chapter.md
+++ b/nixpkgs/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.