2021-12-30 08:56:26 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, gpgme
|
|
|
|
, glibc
|
|
|
|
, lvm2
|
|
|
|
, btrfs-progs
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "werf";
|
2022-03-22 19:44:36 +00:00
|
|
|
version = "1.2.78";
|
2021-12-30 08:56:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "werf";
|
|
|
|
repo = "werf";
|
|
|
|
rev = "v${version}";
|
2022-03-22 19:44:36 +00:00
|
|
|
sha256 = "sha256-ehrzb7WvkYL8oj2RSzKc1KDagV0zg6vMzgpT2sPyhcI=";
|
2021-12-30 08:56:26 +00:00
|
|
|
};
|
2022-03-22 19:44:36 +00:00
|
|
|
vendorSha256 = "sha256-w8ZeAQbZIVOBoRa9fJhXgTeYRCYpkh/U4pwb5u6A9mQ=";
|
2021-12-30 08:56:26 +00:00
|
|
|
proxyVendor = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ gpgme ]
|
|
|
|
++ lib.optionals stdenv.isLinux [ glibc.static lvm2 btrfs-progs ];
|
|
|
|
|
|
|
|
# Flags are derived from
|
|
|
|
# https://github.com/werf/werf/blob/main/scripts/build_release_v3.sh
|
|
|
|
ldflags = [ "-s" "-w" "-X github.com/werf/werf/pkg/werf.Version=v${version}" ]
|
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
"-linkmode external"
|
|
|
|
"-extldflags=-static"
|
|
|
|
];
|
|
|
|
tags = [ "dfrunmount" "dfssh" "containers_image_openpgp" ]
|
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
"exclude_graphdriver_devicemapper"
|
|
|
|
"netgo"
|
|
|
|
"no_devmapper"
|
|
|
|
"osusergo"
|
|
|
|
"static_build"
|
|
|
|
];
|
|
|
|
|
|
|
|
subPackages = [ "cmd/werf" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/werf/werf";
|
|
|
|
description = "GitOps delivery tool";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ azahi ];
|
|
|
|
};
|
|
|
|
}
|