From eeb676e0805677bfba1f2b3242035283181e5c64 Mon Sep 17 00:00:00 2001 From: qubitnano <146656568+qubitnano@users.noreply.github.com> Date: Sat, 8 Nov 2025 18:56:16 -0500 Subject: [PATCH] chkbit: init at 6.5.0 --- pkgs/by-name/ch/chkbit/package.nix | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/by-name/ch/chkbit/package.nix diff --git a/pkgs/by-name/ch/chkbit/package.nix b/pkgs/by-name/ch/chkbit/package.nix new file mode 100644 index 000000000000..057faa190d33 --- /dev/null +++ b/pkgs/by-name/ch/chkbit/package.nix @@ -0,0 +1,43 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + versionCheckHook, +}: + +buildGoModule (finalAttrs: { + pname = "chkbit"; + version = "6.5.0"; + + src = fetchFromGitHub { + owner = "laktak"; + repo = "chkbit"; + tag = "v${finalAttrs.version}"; + hash = "sha256-zf5UNpTsdTRym9B2xfuRIBl4Mpv97K+4VVbVPTEWFms="; + }; + + vendorHash = "sha256-hiXn7LmO4bYti9iufonQSLM1G0BZGB8u0QRqSYBvxNc="; + + ldflags = [ + "-s" + "-w" + "-X main.appVersion=${finalAttrs.version}" + ]; + + # Tests expect binary to be in the source directory + preCheck = '' + ln -s ../go/bin/chkbit . + ''; + + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "version"; + + meta = { + description = "Check your files for data corruption and run quick file deduplication"; + homepage = "https://github.com/laktak/chkbit"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ qubitnano ]; + mainProgram = "chkbit"; + }; +})