Skip to content

Commit fe258bd

Browse files
authored
Fix npc fetch by pinning Git to v2.47.2 (#7)
1 parent d7859b2 commit fe258bd

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

flake.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
url = "github:oxalica/rust-overlay";
88
inputs.nixpkgs.follows = "nixpkgs";
99
};
10+
# This is the last `nixpkgs-unstable` commit with a Git version earlier than
11+
# v2.48.0, which introduced a bug that sometimes causes `git fetch` to fail
12+
# on partial clones like the one `npc` uses.
13+
nixpkgs-git-2-47-2.url = "github:NixOS/nixpkgs/dad564433178067be1fbdfcce23b546254b6d641";
1014
};
1115
outputs =
1216
{
@@ -15,6 +19,7 @@
1519
flake-utils,
1620
crane,
1721
rust-overlay,
22+
nixpkgs-git-2-47-2,
1823
}:
1924
flake-utils.lib.eachDefaultSystem (
2025
system:
@@ -28,7 +33,7 @@
2833
src = ./.;
2934
strictDeps = true;
3035
};
31-
GIT_BIN = "${pkgs.git}/bin/git";
36+
GIT_BIN = "${(import nixpkgs-git-2-47-2 { inherit system; }).git}/bin/git";
3237
NIX_BIN = "${pkgs.nix}/bin/nix";
3338
in
3439
{

0 commit comments

Comments
 (0)