Skip to content

Commit e0c318d

Browse files
committed
fix: upgrade commitizen to fix broken build
Signed-off-by: Reputable2722 <153411261+Reputable2772@users.noreply.github.com>
1 parent 6708424 commit e0c318d

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

flake.nix

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,30 @@
153153
# Installation hooks need to setup manually in each devshell.
154154
pre-commit.check.enable = true;
155155
pre-commit.settings.hooks = {
156-
commitizen.enable = true;
156+
commitizen = {
157+
enable = true;
158+
# Fixes commitizen-tools/commitizen#1864
159+
# Waiting for NixOS/nixpkgs#539725. Patch taken from there.
160+
package = pkgs.commitizen.overrideAttrs (oldAttrs: rec {
161+
version = "4.16.4";
162+
src = pkgs.fetchFromGitHub {
163+
owner = "commitizen-tools";
164+
repo = "commitizen";
165+
tag = "v${version}";
166+
hash = "sha256-lVc1Kdy/IWRa8uoPZfOSSa379bDDknE3dpm0U7DVv0s=";
167+
};
168+
postPatch = ''
169+
substituteInPlace pyproject.toml \
170+
--replace-fail "uv_build >= 0.9.17, <0.12" "uv-build"
171+
'';
172+
makeWrapperArgs = [
173+
"--prefix"
174+
"PATH"
175+
":"
176+
(lib.makeBinPath [ pkgs.gitMinimal ])
177+
];
178+
});
179+
};
157180
nixfmt-rfc-style = {
158181
enable = true;
159182
package = pkgs.nixfmt;

0 commit comments

Comments
 (0)