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

nixos/switch-to-configuration: Fix reload of user units for users of fish shell #45932

Closed
wants to merge 1 commit into from

Conversation

etu
Copy link
Contributor

@etu etu commented Sep 2, 2018

Motivation for this change

Since fish doesn't allow environment variables to be set before a
command by syntax one needs to use env. Using env works in both
fish as well as bash and zsh.

My only concern with this is that we might want to do something like @env@ and replace it somewhere. If someone can point out where I'll change it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

cc @Ma27

…fish shell

Since fish doesn't allow environment variables to be set before a
command by syntax one needs to use `env`. Using `env` works in both
fish as well as bash and zsh.
@Ma27
Copy link
Member

Ma27 commented Sep 2, 2018

Thanks a lot for fixing this, I'm sorry that my change broke your setup!
However, as propsed in #45897 we might want to use a dedicated shell rather than supporting multiple shells.

@etu
Copy link
Contributor Author

etu commented Sep 2, 2018

@Ma27 That other solution is probably more universal, so I'll close this 👍

@etu etu closed this Sep 2, 2018
@etu etu deleted the fix-reload-user-units-for-fish-users branch September 2, 2018 16:23
Ma27 added a commit to Ma27/nixpkgs that referenced this pull request Sep 4, 2018
This fixes an issue with shells like fish that are not fully POSIX
compliant. The syntax `ENV=val cmd' doesn't work properly in there.

This issue has been addressed in NixOS#45932 and NixOS#45945, however it has been
recommended to use a single shell (`stdenv.shell' which is either
`bash' or `sh') to significantly reduce the maintenance overload in the
future.

See NixOS#45897 (comment)

Fixes NixOS#45897

/cc @FRidh @xaverdh @etu
xeji pushed a commit that referenced this pull request Sep 5, 2018
This fixes an issue with shells like fish that are not fully POSIX
compliant. The syntax `ENV=val cmd' doesn't work properly in there.

This issue has been addressed in #45932 and #45945, however it has been
recommended to use a single shell (`stdenv.shell' which is either
`bash' or `sh') to significantly reduce the maintenance overload in the
future.

See #45897 (comment)

Fixes #45897

/cc @FRidh @xaverdh @etu

(cherry picked from commit df05618)
xeji pushed a commit that referenced this pull request Sep 5, 2018
This fixes an issue with shells like fish that are not fully POSIX
compliant. The syntax `ENV=val cmd' doesn't work properly in there.

This issue has been addressed in #45932 and #45945, however it has been
recommended to use a single shell (`stdenv.shell' which is either
`bash' or `sh') to significantly reduce the maintenance overload in the
future.

See #45897 (comment)

Fixes #45897

/cc @FRidh @xaverdh @etu
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

3 participants