mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, stdenv, testers, earthly }:
|
|
|
|
buildGoModule rec {
|
|
pname = "earthly";
|
|
version = "0.8.15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "earthly";
|
|
repo = "earthly";
|
|
rev = "v${version}";
|
|
hash = "sha256-7yw2SmwWsPBCH0LOaZSruYeZ5qL+njGuExy8+11Ni78=";
|
|
};
|
|
|
|
vendorHash = "sha256-bwNuQPGjAQ9Afa2GuPWrW8ytfIvhsOYFKPt0zyfdZhU=";
|
|
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.hostPlatform.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 ];
|
|
};
|
|
}
|