biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / addlicense / default.nix
blob532bf3464fb68f78bc0d3362a796f17f650e7a8f
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , fetchpatch
5 }:
7 buildGoModule rec {
8   pname = "addlicense";
9   version = "1.1.1";
11   src = fetchFromGitHub {
12     owner = "google";
13     repo = "addlicense";
14     rev = "v${version}";
15     sha256 = "sha256-YMMHj6wctKtJi/rrcMIrLmNw/uvO6wCwokgYRQxcsFw=";
16   };
18   patches = [
19     # Add support for Nix files. Upstream is slow with responding to PRs,
20     # patch backported from PR https://github.com/google/addlicense/pull/153.
21     (fetchpatch {
22       url = "https://github.com/google/addlicense/commit/e0fb3f44cc7670dcc5cbcec2211c9ad238c5f9f1.patch";
23       hash = "sha256-XCAvL+HEa1hGc0GAnl+oYHKzBJ3I5ArS86vgABrP/Js=";
24     })
25   ];
27   vendorHash = "sha256-2mncc21ecpv17Xp8PA9GIodoaCxNBacbbya/shU8T9Y=";
29   subPackages = [ "." ];
31   meta = with lib; {
32     description = "Ensures source code files have copyright license headers by scanning directory patterns recursively";
33     homepage = "https://github.com/google/addlicense";
34     license = licenses.asl20;
35     maintainers = with maintainers; [ SuperSandro2000 ];
36     mainProgram = "addlicense";
37   };