This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/ci/woodpecker/common.nix

35 lines
604 B
Nix
Raw Permalink Normal View History

2023-04-08 18:11:07 +00:00
{
lib,
fetchFromGitHub,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in rec {
version = source.date;
src = fetchFromGitHub {
owner = "woodpecker-ci";
repo = "woodpecker";
inherit (source) rev sha256;
};
postBuild = ''
mkdir -p $GOPATH/bin
cd $GOPATH/bin
for f in *; do
mv -- "$f" "woodpecker-$f"
done
cd -
'';
ldflags = [
"-s"
"-w"
"-X github.com/woodpecker-ci/woodpecker/version.Version=${version}"
];
meta = with lib; {
homepage = "https://woodpecker-ci.org/";
license = licenses.asl20;
};
}