2021-05-02 18:30:24 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "earthly";
|
2021-07-24 19:05:29 +02:00
|
|
|
version = "0.5.20";
|
2021-05-02 18:30:24 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "earthly";
|
|
|
|
repo = "earthly";
|
|
|
|
rev = "v${version}";
|
2021-07-24 19:05:29 +02:00
|
|
|
sha256 = "sha256-wPtL5fH6s4qlG82udeg9Gv4iNBjDEeKNTDFHPsW4V/A=";
|
2021-05-02 18:30:24 +02:00
|
|
|
};
|
|
|
|
|
2021-07-24 19:05:29 +02:00
|
|
|
vendorSha256 = "sha256-gydhh/EMSuE/beo+A2CRDdDnQGT6DMjMwthylT339I4=";
|
2021-05-02 18:30:24 +02:00
|
|
|
|
2021-06-03 18:31:57 +02:00
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-s -w
|
|
|
|
-X main.Version=v${version}
|
|
|
|
-X main.DefaultBuildkitdImage=earthly/buildkitd:v${version}
|
|
|
|
-extldflags -static
|
|
|
|
'';
|
|
|
|
|
|
|
|
BUILDTAGS = "dfrunmount dfrunsecurity dfsecrets dfssh dfrunnetwork";
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=(BUILD_TAGS="${BUILDTAGS}")
|
|
|
|
'';
|
|
|
|
|
2021-05-02 18:30:24 +02:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/debugger $out/bin/earthly-debugger
|
|
|
|
mv $out/bin/shellrepeater $out/bin/earthly-shellrepeater
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Build automation for the container era";
|
|
|
|
homepage = "https://earthly.dev/";
|
|
|
|
changelog = "https://github.com/earthly/earthly/releases/tag/v${version}";
|
2021-08-19 23:17:48 +02:00
|
|
|
license = with licenses; [ bsl11 mpl20 ];
|
|
|
|
maintainers = with maintainers; [ matdsoupe ];
|
2021-05-02 18:30:24 +02:00
|
|
|
};
|
|
|
|
}
|