From 511a336703ee0313cce472a60aefdddf4308fa8a Mon Sep 17 00:00:00 2001 From: Sergei Zhekpisov <87662520+szhekpisov@users.noreply.github.com> Date: Fri, 26 Jun 2026 11:31:34 +0100 Subject: [PATCH] diffyml: init at 1.7.0 --- pkgs/by-name/di/diffyml/package.nix | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/di/diffyml/package.nix diff --git a/pkgs/by-name/di/diffyml/package.nix b/pkgs/by-name/di/diffyml/package.nix new file mode 100644 index 000000000000..c0b8fb86e053 --- /dev/null +++ b/pkgs/by-name/di/diffyml/package.nix @@ -0,0 +1,58 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + versionCheckHook, + nix-update-script, +}: + +buildGoModule (finalAttrs: { + pname = "diffyml"; + version = "1.7.0"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "szhekpisov"; + repo = "diffyml"; + tag = "v${finalAttrs.version}"; + hash = "sha256-DIKHvFY/eW3CAF/ojW+D737vFCcZk0peRrSb8I/an9Q="; + }; + + vendorHash = "sha256-QE/EwVzMqUO24ZAl0WBibGx6x0kNo1AUTZtfnQvX50k="; + + # bench/compare and doc/gen-cli-ref are internal dev tools, not user-facing. + excludedPackages = [ + "bench/compare" + "doc/gen-cli-ref" + ]; + + ldflags = [ + "-s" + "-w" + "-X main.version=${finalAttrs.version}" + "-X main.commit=v${finalAttrs.version}" + "-X main.buildDate=1970-01-01" + ]; + + # test/ holds e2e (kind/kubectl) and repo-health suites that need network + # and external tooling; unsuitable for the sandboxed build. + preCheck = '' + rm -rf test + ''; + + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Structural YAML diff tool with Kubernetes awareness and CI-friendly output"; + homepage = "https://szhekpisov.github.io/diffyml/"; + downloadPage = "https://github.com/szhekpisov/diffyml"; + changelog = "https://github.com/szhekpisov/diffyml/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ szhekpisov ]; + mainProgram = "diffyml"; + }; +})