nixpkgs/pkgs/development/tools/earthly/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

2023-05-30 08:32:27 +00:00
{ lib, buildGoModule, fetchFromGitHub, stdenv }:
buildGoModule rec {
pname = "earthly";
2023-05-30 08:32:27 +00:00
version = "0.7.7";
src = fetchFromGitHub {
owner = "earthly";
repo = "earthly";
rev = "v${version}";
2023-05-30 08:32:27 +00:00
sha256 = "sha256-tYoC9OCNAtdQwWyznac5PVl7KLObbFfjs138y5LeQ2A=";
};
2023-05-30 08:32:27 +00:00
vendorSha256 = "sha256-1y34WH1JGAs1eDxreHMqUlGTyrixUFIV1DPN/N5wzS4=";
subPackages = [ "cmd/earthly" "cmd/debugger" ];
CGO_ENABLED = 0;
2021-08-26 06:45:51 +00:00
ldflags = [
2023-05-30 08:32:27 +00:00
"-s"
"-w"
2021-08-26 06:45:51 +00:00
"-X main.Version=v${version}"
2023-05-30 08:32:27 +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-26 06:45:51 +00:00
];
2023-05-30 08:32:27 +00:00
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;
2023-05-30 08:32:27 +00:00
maintainers = with maintainers; [ zoedsoupe konradmalik ];
};
}