2021-05-02 18:30:24 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "earthly";
|
2022-01-24 09:24:32 +01:00
|
|
|
version = "0.6.4";
|
2021-05-02 18:30:24 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "earthly";
|
|
|
|
repo = "earthly";
|
|
|
|
rev = "v${version}";
|
2022-01-24 09:24:32 +01:00
|
|
|
sha256 = "sha256-QrlxH9ihWAVzf9lh3CcVCqFPLmn7bM2pNZUqxnHD2WA=";
|
2021-05-02 18:30:24 +02:00
|
|
|
};
|
|
|
|
|
2022-01-24 09:24:32 +01:00
|
|
|
vendorSha256 = "sha256-pI5aBBUJoAmeJ2Kr0eqP9O/tGhgHCBjINL3406LQ9Dc=";
|
2021-05-02 18:30:24 +02:00
|
|
|
|
2021-08-26 08:45:51 +02:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X main.Version=v${version}"
|
|
|
|
"-X main.DefaultBuildkitdImage=earthly/buildkitd:v${version}"
|
|
|
|
];
|
2021-06-03 18:31:57 +02:00
|
|
|
|
|
|
|
BUILDTAGS = "dfrunmount dfrunsecurity dfsecrets dfssh dfrunnetwork";
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=(BUILD_TAGS="${BUILDTAGS}")
|
|
|
|
'';
|
|
|
|
|
2021-10-24 17:31:27 +02:00
|
|
|
# For some reasons the tests fail, but the program itself seems to work.
|
|
|
|
doCheck = false;
|
|
|
|
|
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-20 14:44:34 +02:00
|
|
|
license = licenses.bsl11;
|
2022-02-07 16:56:03 +01:00
|
|
|
maintainers = with maintainers; [ zoedsoupe ];
|
2021-05-02 18:30:24 +02:00
|
|
|
};
|
|
|
|
}
|