-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
#! /usr/bin/env bash for all scripts that rely on it #8644
Comments
The Nix ecosystem does indeed use a lot of bash.
Why do you believe there's anything to correct? (i suspect you have some mistake impression about how nix works. It does not really care about your system executables.) |
Hey, thanks for the quick reply! I am not against the use of bash, I don't believe that should change. I am pretty new to nix tbh, I've installed NixOS about a week ago and I'm still learning. I'm really enjoying it up to this point. My main concern is about me being able to change the Do you know if that is true, or is there no reason to worry about this? |
Ah. This is a NixOS question. This repository is for the Nix package manager itself, and (speaking generally) Nix itself doesn't have this problem. The code for NixOS is in https://github.com/nixos/nixpkgs, so that'll be the appropriate place to follow up on this. I'm not personally familiar with the details here, but it sounds like whatever you've heard is probably inspired by the description of the option for setting it: You also aren't the only one; I already see a similar issue open in nixpkgs: I do see some public configs where people use this option (ttps://github.com/search?q=language%3Anix+%2Fenvironment.binsh.*pkgs.dash%2F&type=code), so I guess that's a sign that replacing it works well enough for some people. The "warning" was added along with the option to make this configurable 10 years ago, so it's possible that other people replacing this with dash have contributed fixes to any issues they personally run into. Nixpkgs should be receptive to fixes if you try this and run into any dash syntax error messages (where a fix might either be avoiding the bashism causing trouble, or making sure it specifies bash). I'm closing this since it's out of scope here, but you can still reply here if you need me to clarify anything above :) |
Hey.
I like to use dash as my posix shell for shell scripts, by simlinking it to /usr/bin/sh. I've heard that nix uses a lot of shell scripts that rely on bash, which could be affected by a change like that. Could you verify if that's true? If it is, could you perhaps correct the shebangs to reflect the reliance on bash instead of just any shell?
The text was updated successfully, but these errors were encountered: