From 7f30263c0e89f8e51116e5af902861add8fc793f Mon Sep 17 00:00:00 2001 From: Igor Sirotin Date: Mon, 30 Sep 2024 12:53:20 +0100 Subject: [PATCH] ci_: add go-generate-fast to nix (#5890) fix_: go-generate-fast hashes --- nix/overlay.nix | 1 + nix/pkgs/go-generate-fast/default.nix | 16 ++++++++++++++++ nix/shell.nix | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 nix/pkgs/go-generate-fast/default.nix diff --git a/nix/overlay.nix b/nix/overlay.nix index a11fe1d6e..238f4d528 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -56,6 +56,7 @@ in rec { go-modvendor = callPackage ./pkgs/go-modvendor { }; cc-test-reporter = callPackage ./pkgs/cc-test-reporter { }; codecov-cli = callPackage ./pkgs/codecov-cli { }; + go-generate-fast = callPackage ./pkgs/go-generate-fast { }; gomobile = (prev.gomobile.overrideAttrs (old: { patches = [ diff --git a/nix/pkgs/go-generate-fast/default.nix b/nix/pkgs/go-generate-fast/default.nix new file mode 100644 index 000000000..0898194ec --- /dev/null +++ b/nix/pkgs/go-generate-fast/default.nix @@ -0,0 +1,16 @@ +{ buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "go-generate-fast"; + version = "0.3.0"; + + subPackages = [ "." ]; + + src = fetchFromGitHub rec { + owner = "oNaiPs"; + repo = "go-generate-fast"; + rev = "v${version}"; + hash = "sha256-NMGXOI3y3PGt+hrHhOsugACL8c5LIzpwwdt+Ne0MkY8="; + }; + vendorHash = "sha256-8nmnTuDZvnFEPQAxOv19gUgHy6FpI3HLRtqLLob+zrE="; +} \ No newline at end of file diff --git a/nix/shell.nix b/nix/shell.nix index 9a793ae62..10f2647c7 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -21,7 +21,7 @@ in pkgs.mkShell { buildInputs = with pkgs; [ git jq which - go golangci-lint go-junit-report gopls go-bindata gomobileMod codecov-cli + go golangci-lint go-junit-report gopls go-bindata gomobileMod codecov-cli go-generate-fast mockgen protobuf3_20 protoc-gen-go gotestsum go-modvendor openjdk cc-test-reporter ] ++ lib.optionals (stdenv.isDarwin) [ xcodeWrapper ];