pkgs: add woodpecker-plugin-git

This commit is contained in:
Bruno BELANYI 2023-03-25 15:22:30 +01:00
parent ea57ad3eb8
commit c857e4cd2e
2 changed files with 39 additions and 0 deletions

View file

@ -48,5 +48,7 @@ pkgs.lib.makeScope pkgs.newScope (pkgs: {
woodpecker-frontend = pkgs.callPackage ./woodpecker/frontend.nix { }; woodpecker-frontend = pkgs.callPackage ./woodpecker/frontend.nix { };
woodpecker-plugin-git = pkgs.callPackage ./woodpecker-plugin-git { };
woodpecker-server = pkgs.callPackage ./woodpecker/server.nix { }; woodpecker-server = pkgs.callPackage ./woodpecker/server.nix { };
}) })

View file

@ -0,0 +1,37 @@
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoModule rec {
pname = "woodpecker-plugin-git";
version = "2.0.3";
src = fetchFromGitHub {
owner = "woodpecker-ci";
repo = "plugin-git";
rev = "v${version}";
hash = "sha256-KU/A3V7KS8R1nAZoJJwkDc9C8y3t148kUzGnkeYtFjs=";
};
vendorHash = "sha256-63Ly/9yIJu2K/DwOfGs9pYU3fokbs2senZkl3MJ1UIY=";
patches = [
# https://github.com/woodpecker-ci/plugin-git/pull/67
(fetchpatch {
name = "do-not-overwrite-command-env.patch";
url = "https://github.com/woodpecker-ci/plugin-git/commit/970cc63a9b212872deac565c6292feb3f4cf4b51.patch";
hash = "sha256-izu0X7j+OyNbrOkksf+7VF3KiKVylVv2o00xaX/b1Rg=";
})
];
CGO_ENABLED = "0";
# Checks fail because they require network access.
doCheck = false;
meta = with lib; {
description = "Woodpecker plugin for cloning Git repositories.";
homepage = "https://woodpecker-ci.org/";
license = licenses.asl20;
mainProgram = "pluging-git";
maintainers = with maintainers; [ thehedgeh0g ];
platforms = platforms.all;
};
}