Flake commands do not work in sha256 git repos #619
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#619
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Flake commands do not work in sha256 git repos.
Steps To Reproduce
git init --object-format=sha256
)flake.nix
, run some flake command to generateflake.lock
. This will still work since the bug only occurs with a clean working directory.nix eval ...
). You will get an error like this:error: hash 'ae3c3c3b9dd70146d51991f2c5b9cdb4af7e65104f07e8376ac70ab2807250b0' has wrong length for hash type 'sha1'
Expected behavior
Flakes should work with any object format supported by git.
nix --version
outputnix (Lix, like Nix) 2.91.1
Additional context
I found this CppNix issue: https://github.com/NixOS/nix/issues/9980 , but it was said on Matrix that Lix does not use libgit2, so probably the issue is something different?
Just checked, bug still present on
main
(3413ab5629
).looks like it's still true on version
nix (Lix, like Nix) 2.92.0
trying to use a SHA256 flake input results in: