소스 검색

nixpkgs/elvish: use original TMPDIR with nix-shell

Thomas Dy 2 주 전
부모
커밋
ca77c290af
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      .config/nixpkgs/elvish/lib/nix-shell.elv

+ 7 - 0
.config/nixpkgs/elvish/lib/nix-shell.elv

@@ -1,5 +1,12 @@
 use path
 
+# nix-shell overwrites TMPDIR so set it back to the original value
+if (and (has-env ORIG_TMPDIR) (has-env IN_NIX_SHELL)) {
+  set-env TMPDIR $E:ORIG_TMPDIR
+} elif (has-env TMPDIR) {
+  set-env ORIG_TMPDIR $E:TMPDIR
+}
+
 edit:add-var nix~ {|@a|
   var is-shell = (and ^
     (> (count $a) 0) ^