mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
utils: %nix-wrapper-shell-default-unset-env-vars: Make it an identifier macro and export.
Fixes: #61.
This commit is contained in:
1 file changed
+15
-11
@@ -15,10 +15,13 @@
|
|||||||
#:use-module (guix build-system trivial)
|
#:use-module (guix build-system trivial)
|
||||||
;; Guix packages
|
;; Guix packages
|
||||||
#:autoload (gnu packages package-management) (nix)
|
#:autoload (gnu packages package-management) (nix)
|
||||||
#:export (%nix-wrapper-default-exclude-env-paths
|
#:export (;; Paramaters.
|
||||||
|
%nix-wrapper-default-exclude-env-paths
|
||||||
%nix-wrapper-profile-nixpkgs-commit
|
%nix-wrapper-profile-nixpkgs-commit
|
||||||
%nix-wrapper-profile-extra-outputs
|
%nix-wrapper-profile-extra-outputs
|
||||||
|
|
||||||
|
%nix-wrapper-shell-default-unset-env-vars
|
||||||
|
|
||||||
nix-shell-wrapper
|
nix-shell-wrapper
|
||||||
nix-wrapper->package nix-shell-wrapper->package
|
nix-wrapper->package nix-shell-wrapper->package
|
||||||
with-nix-profile))
|
with-nix-profile))
|
||||||
@@ -69,14 +72,15 @@
|
|||||||
(_ (list #f)))
|
(_ (list #f)))
|
||||||
(%nix-wrapper-default-exclude-env-paths))))
|
(%nix-wrapper-default-exclude-env-paths))))
|
||||||
|
|
||||||
(define (%nix-wrapper-shell-default-unset-env-vars)
|
;; Environment variables to unset in the `nix shell' environment, used by
|
||||||
"Environment variables to unset in the `nix shell' environment, used by
|
;; `nix-shell-wrapper' by default.
|
||||||
`nix-shell-wrapper' by default."
|
(define-syntax %nix-wrapper-shell-default-unset-env-vars
|
||||||
(filter-map (match-lambda
|
(identifier-syntax
|
||||||
((? string? env) env)
|
(filter-map (match-lambda
|
||||||
(((? string? env) . _) env)
|
((? string? env) env)
|
||||||
(_ #f))
|
(((? string? env) . _) env)
|
||||||
(%nix-wrapper-default-exclude-env-paths)))
|
(_ #f))
|
||||||
|
(%nix-wrapper-default-exclude-env-paths))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
@@ -275,7 +279,7 @@ in
|
|||||||
(run-command '())
|
(run-command '())
|
||||||
(options '())
|
(options '())
|
||||||
(environment-keep #t)
|
(environment-keep #t)
|
||||||
(environment-unset (%nix-wrapper-shell-default-unset-env-vars))
|
(environment-unset %nix-wrapper-shell-default-unset-env-vars)
|
||||||
(environment-set '())
|
(environment-set '())
|
||||||
(nix (file-append nix "/bin/nix")))
|
(nix (file-append nix "/bin/nix")))
|
||||||
"Return a nix-wrapper that wraps the `nix shell' command-line utility and
|
"Return a nix-wrapper that wraps the `nix shell' command-line utility and
|
||||||
@@ -298,7 +302,7 @@ When ENVIRONMENT-KEEP (default: #t, boolean / list of strings) is set to a value
|
|||||||
other than #t, the environment will be cleared, keeping only specified
|
other than #t, the environment will be cleared, keeping only specified
|
||||||
environment variables.
|
environment variables.
|
||||||
|
|
||||||
ENVIRONMENT-UNSET (default: (%nix-wrapper-shell-default-unset-env-vars), list of
|
ENVIRONMENT-UNSET (default: %nix-wrapper-shell-default-unset-env-vars, list of
|
||||||
strings) unsets specified environment variables from the environment. It's only
|
strings) unsets specified environment variables from the environment. It's only
|
||||||
usable when ENVIRONMENT-KEEP is #t.
|
usable when ENVIRONMENT-KEEP is #t.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user