mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-04 03:53:56 +00:00
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.
36 lines
840 B
Nix
36 lines
840 B
Nix
{ buildGoModule, fetchFromGitHub, lib }:
|
|
|
|
buildGoModule rec {
|
|
pname = "moq";
|
|
version = "0.5.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "matryer";
|
|
repo = "moq";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-fIvh+IvkyU76RzJvThIFrsBOg/w+FtNjgthOy04siOc=";
|
|
};
|
|
|
|
vendorHash = "sha256-Kp0mRLmOlV3UpYSQJoc54tYU78sg+RZ5qy/1ime7j7w=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=${version}"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/matryer/moq";
|
|
description = "Interface mocking tool for go generate";
|
|
mainProgram = "moq";
|
|
longDescription = ''
|
|
Moq is a tool that generates a struct from any interface. The struct can
|
|
be used in test code as a mock of the interface.
|
|
'';
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ anpryl ];
|
|
};
|
|
}
|