From 1fbec8a89d5229ab53dabe8b8c710856f17b9e67 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:46:05 +0100 Subject: [PATCH] addlicense: add nix support --- pkgs/tools/misc/addlicense/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/misc/addlicense/default.nix b/pkgs/tools/misc/addlicense/default.nix index 9b0dc691054a..532bf3464fb6 100644 --- a/pkgs/tools/misc/addlicense/default.nix +++ b/pkgs/tools/misc/addlicense/default.nix @@ -1,6 +1,7 @@ { lib , buildGoModule , fetchFromGitHub +, fetchpatch }: buildGoModule rec { @@ -14,6 +15,15 @@ buildGoModule rec { sha256 = "sha256-YMMHj6wctKtJi/rrcMIrLmNw/uvO6wCwokgYRQxcsFw="; }; + patches = [ + # Add support for Nix files. Upstream is slow with responding to PRs, + # patch backported from PR https://github.com/google/addlicense/pull/153. + (fetchpatch { + url = "https://github.com/google/addlicense/commit/e0fb3f44cc7670dcc5cbcec2211c9ad238c5f9f1.patch"; + hash = "sha256-XCAvL+HEa1hGc0GAnl+oYHKzBJ3I5ArS86vgABrP/Js="; + }) + ]; + vendorHash = "sha256-2mncc21ecpv17Xp8PA9GIodoaCxNBacbbya/shU8T9Y="; subPackages = [ "." ];