From b6dad2afe6684c6db2b33d7a5b0191eff2a2a5a4 Mon Sep 17 00:00:00 2001 From: Anatolii Prylutskyi Date: Fri, 5 Aug 2022 17:27:34 +0300 Subject: [PATCH] moq: init at 0.2.7 --- pkgs/development/tools/moq/default.nix | 34 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/tools/moq/default.nix diff --git a/pkgs/development/tools/moq/default.nix b/pkgs/development/tools/moq/default.nix new file mode 100644 index 000000000000..40f004d6e5bf --- /dev/null +++ b/pkgs/development/tools/moq/default.nix @@ -0,0 +1,34 @@ +{ stdenv, buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "moq"; + version = "0.2.7"; + + src = fetchFromGitHub { + owner = "matryer"; + repo = "moq"; + rev = "v${version}"; + sha256 = "sha256-me/KD8bgzA+VU7WrfKlk8HZTInJqhijLAVTiZcJRzms="; + }; + + vendorSha256 = "sha256-XTe52pytjZYJALBOcnytA8z/d3UHSKcU1lJmJm8Iawo="; + + subPackages = [ "." ]; + + ldflags = [ + "-s" + "-w" + "-X main.Version=${version}" + ]; + + meta = with lib; { + homepage = "https://github.com/matryer/moq"; + description = "Interface mocking tool for go generate"; + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c62557b39f40..322f80e9a2f9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24221,6 +24221,8 @@ with pkgs; impl = callPackage ../development/tools/impl { }; + moq = callPackage ../development/tools/moq { }; + quicktemplate = callPackage ../development/tools/quicktemplate { }; linux_logo = callPackage ../tools/misc/linux-logo { };