3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/earthly/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "earthly";
2021-05-31 03:57:33 +01:00
version = "0.5.15";
src = fetchFromGitHub {
owner = "earthly";
repo = "earthly";
rev = "v${version}";
2021-05-31 03:57:33 +01:00
sha256 = "sha256-3hiiCcCgbWxSfG8XCcoKdNJsQoP2L2G4g4zFQkFtzQI=";
};
2021-05-13 10:44:07 +01:00
vendorSha256 = "sha256-q3dDV0eop2NxXHFrlppWsZrO2Hz1q5xhs1DnB6PvG9g=";
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}")
'';
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 ];
};
}