mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 14:43:37 +00:00
80 lines
1.7 KiB
Nix
80 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, btrfs-progs
|
|
, glibc
|
|
, testers
|
|
, werf
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "werf";
|
|
version = "1.2.153";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "werf";
|
|
repo = "werf";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-BdGeafZvMgH6qRyYrFPQp0r2470me755J6gUK9XkIJQ=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-XpSAFiweD2oUKleD6ztDp1+3PpfUWXfGaaE/9mzRrUQ=";
|
|
|
|
proxyVendor = true;
|
|
|
|
subPackages = [ "cmd/werf" ];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs glibc.static ];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X github.com/werf/werf/pkg/werf.Version=${src.rev}"
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
"-extldflags=-static"
|
|
"-linkmode external"
|
|
];
|
|
|
|
tags = [
|
|
"containers_image_openpgp"
|
|
"dfrunmount"
|
|
"dfssh"
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
"exclude_graphdriver_devicemapper"
|
|
"netgo"
|
|
"no_devmapper"
|
|
"osusergo"
|
|
"static_build"
|
|
];
|
|
|
|
# There are no tests for cmd/werf.
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd werf \
|
|
--bash <($out/bin/werf completion --shell=bash) \
|
|
--zsh <($out/bin/werf completion --shell=zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = werf;
|
|
command = "werf version";
|
|
version = "v${version}";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "GitOps delivery tool";
|
|
longDescription = ''
|
|
The CLI tool gluing Git, Docker, Helm & Kubernetes with any CI system to
|
|
implement CI/CD and Giterminism.
|
|
'';
|
|
homepage = "https://werf.io";
|
|
changelog = "https://github.com/werf/werf/releases/tag/${src.rev}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ azahi ];
|
|
};
|
|
}
|