-
Notifications
You must be signed in to change notification settings - Fork 93
fix: support pure mode #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d1256bc to
15aeaab
Compare
15aeaab to
7fc7675
Compare
| rmCommand = runCommand "coreutils-rm" { } '' | ||
| mkdir -p $out/bin | ||
| ln -s ${coreutils}/bin/rm $out/bin/rm | ||
| ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this to avoid adding all of coreutils to the naked shell.
| # Fix for `nix-shell --pure` line 1: rm: command not found | ||
| # occurs at `_nix_shell_clean_tmpdir` in `nixos/nix` | ||
| ${lib.optionalString (builtins.getEnv "IN_NIX_SHELL" == "pure") '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
builtins.getEnv "IN_NIX_SHELL" doesn't seems to be problematic from my cursory running of nix develop --ignore-environment --pure-eval nix-shell nix-shell --pure etc.
This issue occurs only for nix-shell --pure and I fixed it only for that case.
| export PATH=${cfg.package}/bin:${pkgs.coreutils}/bin | ||
| # Abort if the data dir already exists | ||
| [[ ! -d "$PGDATA" ]] || exit 0 | ||
| initdb ${concatStringsSep " " cfg.initdbArgs} | ||
| initdb ${lib.concatStringsSep " " cfg.initdbArgs} | ||
| cat >> "$PGDATA/postgresql.conf" <<EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cat is fine. because of coreutils added to the path.
|
Do you mind sending a second PR with the changes to When it comes to The only place where I sometimes still use the keyword is on a very limited scope, like Sometimes when the repetition of |
7fc7675 to
8622022
Compare
|
Opened #360 |
|
thanks, merged |
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
8622022 to
fc08871
Compare
Signed-off-by: phanirithvij <phanirithvij2000@gmail.com>
|
thanks! |
Previously
Now