werf: 2.5.0 -> 2.6.1

This commit is contained in:
Azat Bahawi 2024-06-18 19:06:05 +03:00
parent df9ddccfeb
commit a2aafdf35a
No known key found for this signature in database
GPG key ID: C8C6BDDB3847F72B
3 changed files with 105 additions and 99 deletions

View file

@ -1,97 +0,0 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
, btrfs-progs
, testers
, werf
}:
buildGoModule rec {
pname = "werf";
version = "2.5.0";
src = fetchFromGitHub {
owner = "werf";
repo = "werf";
rev = "v${version}";
hash = "sha256-dZwZzBisQUmOz1lij6L0NHigXW2DtUd6s86sHYq8UPA=";
};
vendorHash = "sha256-cWOnIEvVer+USqNQJmhZ7pYSJfzY2xjq2oTxRd/y94w=";
proxyVendor = true;
subPackages = [ "cmd/werf" ];
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isLinux [ btrfs-progs ]
++ lib.optionals stdenv.hostPlatform.isGnu [ stdenv.cc.libc.static ];
CGO_ENABLED = if stdenv.isLinux then 1 else 0;
ldflags = [
"-s"
"-w"
"-X github.com/werf/werf/v2/pkg/werf.Version=${src.rev}"
] ++ lib.optionals (CGO_ENABLED == 1) [
"-extldflags=-static"
"-linkmode external"
];
tags = [
"containers_image_openpgp"
"dfrunmount"
"dfrunnetwork"
"dfrunsecurity"
"dfssh"
] ++ lib.optionals (CGO_ENABLED == 1) [
"cni"
"exclude_graphdriver_devicemapper"
"netgo"
"no_devmapper"
"osusergo"
"static_build"
];
preCheck = ''
# Test all targets.
unset subPackages
# Remove tests that require external services.
rm -rf \
integration/suites \
pkg/true_git/*test.go \
test/e2e
'' + lib.optionalString (CGO_ENABLED == 0) ''
# A workaround for osusergo.
export USER=nixbld
'';
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 = src.rev;
};
meta = with lib; {
description = "GitOps delivery tool";
mainProgram = "werf";
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 ];
};
}

View file

@ -0,0 +1,105 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
btrfs-progs,
testers,
werf,
}:
buildGoModule rec {
pname = "werf";
version = "2.6.1";
src = fetchFromGitHub {
owner = "werf";
repo = "werf";
rev = "v${version}";
hash = "sha256-10RyCVF1w5xj/qhFXQTlyrt9HG/4di2fUwUtDHU6t44=";
};
vendorHash = "sha256-d1Dn+JN8tiBVx7YDbtvLW0YgIW2ENrEdx4gKatYy1hw=";
proxyVendor = true;
subPackages = [ "cmd/werf" ];
nativeBuildInputs = [ installShellFiles ];
buildInputs =
lib.optionals stdenv.isLinux [ btrfs-progs ]
++ lib.optionals stdenv.hostPlatform.isGnu [ stdenv.cc.libc.static ];
CGO_ENABLED = if stdenv.isLinux then 1 else 0;
ldflags =
[
"-s"
"-w"
"-X github.com/werf/werf/v2/pkg/werf.Version=v${version}"
]
++ lib.optionals (CGO_ENABLED == 1) [
"-extldflags=-static"
"-linkmode external"
];
tags =
[
"containers_image_openpgp"
"dfrunmount"
"dfrunnetwork"
"dfrunsecurity"
"dfssh"
]
++ lib.optionals (CGO_ENABLED == 1) [
"cni"
"exclude_graphdriver_devicemapper"
"netgo"
"no_devmapper"
"osusergo"
"static_build"
];
preCheck =
''
# Test all targets.
unset subPackages
# Remove tests that require external services.
rm -rf \
integration/suites \
pkg/true_git/*test.go \
test/e2e
''
+ lib.optionalString (CGO_ENABLED == 0) ''
# A workaround for osusergo.
export USER=nixbld
'';
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 = src.rev;
};
meta = with lib; {
description = "GitOps delivery tool";
mainProgram = "werf";
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 ];
};
}

View file

@ -40714,8 +40714,6 @@ with pkgs;
webwormhole = callPackage ../tools/networking/webwormhole { };
werf = callPackage ../applications/networking/cluster/werf { };
yor = callPackage ../applications/networking/cluster/yor { };
wifi-password = callPackage ../os-specific/darwin/wifi-password { };