Skip to content

Commit 63d02fa

Browse files
n0099BenBE
andcommitted
Shadow path prefixes that used by NixOS
In NixOS or Linux/MacOS installed with nix, all executable binary is located under `/nix/store` instead of paths like `/usr/bin` that used by distros compliant with FHS: https://old.reddit.com/r/NixOS/comments/190v0n7/ive_been_told_that_nix_isnt_fhs_compliant_what/ And `/run/current-system` is a symlink to an dir in `/nix/store` that represents the current generation: https://xn--w5d.cc/2020/08/31/current-system-nixos.html Co-authored-by: BenBE <BenBE@geshi.org>
1 parent 18b46ea commit 63d02fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Process.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,12 @@ void Process_makeCommandStr(Process* this, const Settings* settings) {
295295
} \
296296
} \
297297
break; \
298+
case 'n': \
299+
CHECK_AND_MARK(str_, "/nix/store/"); \
300+
break; \
301+
case 'r': \
302+
CHECK_AND_MARK(str_, "/run/current-system/"); \
303+
break; \
298304
} \
299305
} while (0)
300306

0 commit comments

Comments
 (0)