We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
On WSL2, CRLF line endings break flake build unless git attributes are overridden, usually resulting in a confusing $'\r': command not found error.
$'\r': command not found
Steps To Reproduce
In a NixOS-WSL instance, run
$ git clone https://github.com/cachix/devenv.git && cd devenv $ nix build .#devenv error: builder for '/nix/store/hnjx2v3nw9al8pjcp4g22b2s9xhyq9r7-devenv-1.0.5.drv' failed with exit code 127; last 10 log lines: > > running 0 tests > > test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s > > Finished cargoCheckHook > Running phase: installPhase > Executing cargoInstallHook > /nix/store/v5lsd029lz5lfhamivbgqyp3zdv94ah2-stdenv-linux/setup: line 114: $'\r': command not found > /nix/store/v5lsd029lz5lfhamivbgqyp3zdv94ah2-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context For full logs, run 'nix log /nix/store/hnjx2v3nw9al8pjcp4g22b2s9xhyq9r7-devenv-1.0.5.drv'. $ echo "*.nix text eol=lf" > .gitattributes && git add .gitattributes $ nix build .#devenv && echo $? 0
Expected behavior
devenv should be built without having to override git EOL attributes.
nix-env --version output
nix-env --version
nix-env (Nix) 2.18.1
Additional context
Previously reported at https://discourse.nixos.org/t/nix-flakes-and-line-endings/22065, but not strictly WSL2-related.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered:
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/nix-flakes-and-line-endings/22065/10
Sorry, something went wrong.
MWE can very likely be reduced: git init; trivially build a file containing CRLF; observe different hash depending on git attributes?
git init
No branches or pull requests
Describe the bug
On WSL2, CRLF line endings break flake build unless git attributes are overridden, usually resulting in a confusing
$'\r': command not found
error.Steps To Reproduce
In a NixOS-WSL instance, run
Expected behavior
devenv should be built without having to override git EOL attributes.
nix-env --version
outputnix-env (Nix) 2.18.1
Additional context
Previously reported at https://discourse.nixos.org/t/nix-flakes-and-line-endings/22065, but not strictly WSL2-related.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: