depot/third_party/nixpkgs/pkgs/development/tools/earthly/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

49 lines
1.2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, stdenv }:
buildGoModule rec {
pname = "earthly";
version = "0.7.23";
src = fetchFromGitHub {
owner = "earthly";
repo = "earthly";
rev = "v${version}";
hash = "sha256-YXfW+O7u97x8YoWLNFSU/OIB9DGsqWEIwUpfvnXySMg=";
};
vendorHash = "sha256-Tr9clCUS7T0295Oxe6wvQN0oXCg1G48rzGXBL3R9TYU=";
subPackages = [ "cmd/earthly" "cmd/debugger" ];
CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X main.Version=v${version}"
"-X main.DefaultBuildkitdImage=docker.io/earthly/buildkitd:v${version}"
"-X main.GitSha=v${version}"
"-X main.DefaultInstallationName=earthly"
] ++ lib.optionals stdenv.isLinux [
"-extldflags '-static'"
];
tags = [
"dfrunmount"
"dfrunnetwork"
"dfrunsecurity"
"dfsecrets"
"dfssh"
];
postInstall = ''
mv $out/bin/debugger $out/bin/earthly-debugger
'';
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; [ zoedsoupe konradmalik ];
};
}