Skip to content
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

Unify some shell init logic with Nix's nix-profile.sh.in #40817

Merged
merged 3 commits into from May 24, 2018

Conversation

dezgeg
Copy link
Contributor

@dezgeg dezgeg commented May 20, 2018

Motivation for this change

I was looking into unifying some of the NixOS shell init logic and the Nix single-user logic at https://github.com/NixOS/nix/blob/master/scripts/nix-profile.sh.in. Here's a first pass of unification in the Nix -> NixOS direction.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)

In practice $HOME doesn't contain spaces, but let's stick to best
shell scripting practices anyway.
Half of the script is using 'test' and other half '[ ]'. Let's stick to
'[ ]' everywhere as it seems more conventional in nixpkgs.
Steal this from scripts/nix-profile.sh.in in Nix to keep things more
consistent.
@dezgeg dezgeg merged commit 6f1f11a into NixOS:master May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants