aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2022-08-22 18:53:59 +0200
committerpacien2022-08-22 18:53:59 +0200
commit9f8ee57824aa587ecdb28620457ba53573249f3a (patch)
treec75ba2c78db141dcfb215f6b1c547c6c9306cf69
parent96411aaa21543c81ce53fd9210e63c5e3d4ac519 (diff)
downloadflaky-utils-9f8ee57824aa587ecdb28620457ba53573249f3a.tar.gz
lib.mkDevShell: escape environment variable values
-rw-r--r--lib/mk-dev-shell.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mk-dev-shell.nix b/lib/mk-dev-shell.nix
index e0bb441..8078f35 100644
--- a/lib/mk-dev-shell.nix
+++ b/lib/mk-dev-shell.nix
@@ -4,8 +4,10 @@
4}: 4}:
5 5
6let 6let
7 # TODO: escape values properly 7 exportEnvVar = k: v: with pkgs.lib; ''
8 exportEnvVar = k: v: ''export ${k}="${v}"; echo ${k}=\"${v}\"''; 8 export ${escapeShellArg k}=${escapeShellArg v}
9 echo ${escapeShellArg k}=${escapeShellArg v}
10 '';
9 exportedEnvVars = pkgs.lib.mapAttrsToList exportEnvVar envVars; 11 exportedEnvVars = pkgs.lib.mapAttrsToList exportEnvVar envVars;
10 12
11in pkgs.mkShell { 13in pkgs.mkShell {