2024-01-25 14:12:00 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, stdenv, testers, earthly }:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "earthly";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.8.14";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "earthly";
|
|
|
|
repo = "earthly";
|
|
|
|
rev = "v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-G9AvJMrgb71KxOaYScYOVuYSwubLlSd6a9KhzA8DKlA=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
vendorHash = "sha256-Uy/h6TBmDYHSewq3TbchLe+AtdvO2xNSp9pVDglRKVc=";
|
2023-07-15 17:15:38 +00:00
|
|
|
subPackages = [ "cmd/earthly" "cmd/debugger" ];
|
|
|
|
|
|
|
|
CGO_ENABLED = 0;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
2023-07-15 17:15:38 +00:00
|
|
|
"-s"
|
|
|
|
"-w"
|
2021-08-27 14:25:00 +00:00
|
|
|
"-X main.Version=v${version}"
|
2023-07-15 17:15:38 +00:00
|
|
|
"-X main.DefaultBuildkitdImage=docker.io/earthly/buildkitd:v${version}"
|
|
|
|
"-X main.GitSha=v${version}"
|
|
|
|
"-X main.DefaultInstallationName=earthly"
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
"-extldflags '-static'"
|
2021-08-27 14:25:00 +00:00
|
|
|
];
|
2021-06-06 07:54:09 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
tags = [
|
|
|
|
"dfrunmount"
|
|
|
|
"dfrunnetwork"
|
|
|
|
"dfrunsecurity"
|
|
|
|
"dfsecrets"
|
|
|
|
"dfssh"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/debugger $out/bin/earthly-debugger
|
|
|
|
'';
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru = {
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = earthly;
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Build automation for the container era";
|
|
|
|
homepage = "https://earthly.dev/";
|
|
|
|
changelog = "https://github.com/earthly/earthly/releases/tag/v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.mpl20;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ zoedsoupe konradmalik ];
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|