depot/third_party/nixpkgs/pkgs/development/tools/earthly/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

56 lines
1.3 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, stdenv, testers, earthly }:
buildGoModule rec {
pname = "earthly";
version = "0.8.3";
src = fetchFromGitHub {
owner = "earthly";
repo = "earthly";
rev = "v${version}";
hash = "sha256-xjehcMm7lW0t65j0hQxbqmMWt1uuK8I4/MB7mjr+axw=";
};
vendorHash = "sha256-NNOUo2X2rwvKRP/zgmTexyXFDNT/LO/kE4HiKwFWQUw=";
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
'';
passthru = {
tests.version = testers.testVersion {
package = earthly;
version = "v${version}";
};
};
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 ];
};
}