571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
34 lines
757 B
Nix
34 lines
757 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, nix-update-script
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "exhaustive";
|
|
version = "0.12.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nishanths";
|
|
repo = "exhaustive";
|
|
rev = "v${version}";
|
|
hash = "sha256-OLIdtKzCqnBkzdUSIl+UlENeMl3zrBE47pLWPg+6qXw=";
|
|
};
|
|
|
|
vendorHash = "sha256-DyN2z6+lA/163k6TTQZ+ypm9s2EV93zvSo/yKQZXvCg=";
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Check exhaustiveness of switch statements of enum-like constants in Go code";
|
|
mainProgram = "exhaustive";
|
|
homepage = "https://github.com/nishanths/exhaustive";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ meain ];
|
|
};
|
|
}
|