Skip to content

Support the sha256 git object format #9980

@theoparis

Description

@theoparis

Without supporting sha256, nixos-rebuild complains that sha256 isn't a supported object format on my system configuration flake utilizing sha256 via git init --object-format sha256.

This seems to involve adding -DEXPERIMENTAL_SHA256=ON when building libgit2 at the moment. See https://github.com/libgit2/libgit2/releases/tag/v1.6.1 for more information.

Git >=2.42 supports this. Not sure if github supports it but gitlab and gitea do.

Patches

See https://github.com/theoparis/nix

The libgit2 library pkgconf file is renamed to libgit2-experimental.pc. This requires a change to configure.ac and rerunning autoreconf -fi. It also requires symlinking the git2 include path from git2-experimental to git2. The libgit2 tests also seem to fail 😕
A better solution here might be to patch libgit2's cmake files to remove the -experimental suffix.

The other issue is that I don't know when libgit2 will remove the experimental flag requirement. There doesn't seem to be anything about it other than the notes in that specific release.

Metadata

Metadata

Assignees

Labels

fetchingNetworking with the outside (non-Nix) world, input locking

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions