2021-05-02 17:30:24 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "earthly";
|
2021-07-09 07:34:41 +01:00
|
|
|
version = "0.5.18";
|
2021-05-02 17:30:24 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "earthly";
|
|
|
|
repo = "earthly";
|
|
|
|
rev = "v${version}";
|
2021-07-09 07:34:41 +01:00
|
|
|
sha256 = "sha256-YY4scGRMuvyEpeEgvoJJsTtROl11hMyGr7vYBYvJY/w=";
|
2021-05-02 17:30:24 +01:00
|
|
|
};
|
|
|
|
|
2021-07-09 07:34:41 +01:00
|
|
|
vendorSha256 = "sha256-aDkaOycQ/wPybSH5fnJIGtCOh+KV0wEF+qinRQQIdm4=";
|
2021-05-02 17:30:24 +01:00
|
|
|
|
2021-06-03 17:31:57 +01: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 17:30:24 +01: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}";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ mdsp ];
|
|
|
|
};
|
|
|
|
}
|