feat: add use_default_shell_env parameter
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 958d1c1..46c7ca2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,13 +5,13 @@
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-
 ## [NEXT.VERSION]
 
 ### Added
 
 - Documenting `exclude_patterns` workaround [#31](https://github.com/TendTo/rules_doxygen/issues/31) (thanks to @AustinSchuh)
 - Documenting limitations for the automatic download of the doxygen binary in the `doxygen` extension rule [#32](https://github.com/TendTo/rules_doxygen/issues/32) (thanks to @oxidase)
+- `use_default_shell_env` parameter to allow the use of the default shell environment when running doxygen. Allows for better integration with the user's environment at the cost of hermeticity.
 
 ## [2.4.2]
 
diff --git a/doxygen/doxygen.bzl b/doxygen/doxygen.bzl
index 6ce5f18..0d6783d 100644
--- a/doxygen/doxygen.bzl
+++ b/doxygen/doxygen.bzl
@@ -90,6 +90,7 @@
         executable = ctx.executable._executable,
         mnemonic = "DoxygenBuild",
         progress_message = "Building doxygen documentation for rule '%s'" % ctx.label.name,
+        use_default_shell_env = ctx.attr.use_default_shell_env,
     )
 
     return [
@@ -143,6 +144,10 @@
 - `# {{OUTPUT DIRECTORY}}`: The directory provided in the `outs` attribute.
 """,
         ),
+        "use_default_shell_env": attr.bool(
+            default = False,
+            doc = "Whether to use the default shell environment when running doxygen.",
+        ),
         "dot_executable": attr.label(
             executable = True,
             cfg = "exec",
@@ -180,6 +185,7 @@
         configurations = None,
         doxyfile_template = None,
         doxygen_extra_args = [],
+        use_default_shell_env = False,
         outs = ["html"],
         # Doxygen specific attributes
         doxyfile_encoding = None,
@@ -671,6 +677,7 @@
             - `{{OUTDIR}}`: The output directory where the generated documentation will be placed.
                 Can be used anywhere in the Doxyfile, usually to generate additional output files, like tag files.
         doxygen_extra_args: Extra arguments to pass to the doxygen executable.
+        use_default_shell_env: Whether to use the default shell environment when running doxygen.
         outs: Output folders bazel will keep. If only the html outputs is of interest, the default value will do.
              otherwise, a list of folders to keep is expected (e.g. ["html", "latex"]).
              Note that the rule will also generate an output group for each folder in the outs list having the same name.
@@ -1306,5 +1313,6 @@
         configurations = configurations,
         doxygen_extra_args = doxygen_extra_args,
         dot_executable = dot_executable,
+        use_default_shell_env = use_default_shell_env,
         **kwargs
     )