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
nix store add-file can't add a file from stdin.
nix store add-file
Steps To Reproduce
$ echo hi | ./outputs/out/bin/nix store add-file /dev/stdin error: ca hash mismatch importing path '/nix/store/c3cgy7lnh6ni2kqvsxqblyz2pzb2hl2a-stdin'; specified: sha256:1r3v22qkypccqifzbww5lrn6hf1chi23m6zzkyvb8bvg457nxslq got: sha256:0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73
It seems that it can add the empty file, but only the empty file
$ true | nix store add-file /dev/stdin /nix/store/gzm5hrm4a70c5kard6v2792hpk07b1jy-stdin
Expected behavior
Print a store path.
Probably it needs to traverse the stream twice, which doesn't work for a pipe. Three solutions
Don't we have a Sink or Source that retains the contents in memory until it reaches a certain size and then writes it all to disk? If not, we should.
nix-env --version output
nix-env --version
Happens with my system nix
$ nix-env --version nix-env (Nix) 2.11.1
.. and also with a recently built master nix 2.14pre
master
2.14pre
Additional context
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered:
Triaged in the Nix team meeting 2023-02-17:
Sorry, something went wrong.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2023-02-17-nix-team-meeting-minutes-33/25624/1
No branches or pull requests
Describe the bug
nix store add-file
can't add a file from stdin.Steps To Reproduce
It seems that it can add the empty file, but only the empty file
Expected behavior
Print a store path.
Probably it needs to traverse the stream twice, which doesn't work for a pipe.
Three solutions
Don't we have a Sink or Source that retains the contents in memory until it reaches a certain size and then writes it all to disk? If not, we should.
nix-env --version
outputHappens with my system nix
.. and also with a recently built
master
nix2.14pre
Additional context
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: