mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-17 01:24:47 +00:00
teller: 1.5.6 → 2.0.7 (#314308)
This commit is contained in:
parent
ab666e8ad9
commit
23381e72e1
@ -1,70 +1,57 @@
|
|||||||
{ lib, buildGoModule, fetchFromGitHub, nix-update-script }:
|
{
|
||||||
|
lib,
|
||||||
|
rustPlatform,
|
||||||
|
fetchFromGitHub,
|
||||||
|
nix-update-script,
|
||||||
|
protobuf,
|
||||||
|
stdenv,
|
||||||
|
darwin,
|
||||||
|
pkg-config,
|
||||||
|
openssl,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
pname = "teller";
|
pname = "teller";
|
||||||
version = "1.5.6";
|
version = "2.0.7";
|
||||||
date = "2022-10-13";
|
date = "2024-05-19";
|
||||||
in
|
in
|
||||||
buildGoModule {
|
rustPlatform.buildRustPackage {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tellerops";
|
owner = "tellerops";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-vgrfWKKXf4C4qkbGiB3ndtJy1VyTx2NJs2QiOSFFZkE=";
|
hash = "sha256-CI74nMMTIPwjJfy7ASR19V6EbYZ62NoAOxlP3Xt2BuI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = null;
|
cargoHash = "sha256-iqZX+9l3TWrFuaQreNz4RrCgPQCyKJt6RJ1UeKYaNRs=";
|
||||||
|
|
||||||
# use make instead of default checks because e2e does not work with `buildGoDir`
|
nativeBuildInputs = [
|
||||||
checkPhase = ''
|
protobuf
|
||||||
runHook preCheck
|
pkg-config
|
||||||
HOME="$(mktemp -d)"
|
];
|
||||||
# We do not set trimpath for tests, in case they reference test assets
|
|
||||||
export GOFLAGS=''${GOFLAGS//-trimpath/}
|
|
||||||
|
|
||||||
make test
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
|
||||||
|
|
||||||
# e2e tests can fail on first try
|
doCheck = false;
|
||||||
|
|
||||||
max_iteration=3
|
doInstallCheck = true;
|
||||||
for i in $(seq 1 $max_iteration)
|
installCheckPhase = ''
|
||||||
do
|
$out/bin/teller --version 2>&1 | grep ${version};
|
||||||
make e2e
|
|
||||||
result=$?
|
|
||||||
if [[ $result -eq 0 ]]
|
|
||||||
then
|
|
||||||
echo "e2e tests passed"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo "e2e tests failed, retrying..."
|
|
||||||
sleep 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $result -ne 0 ]]
|
|
||||||
then
|
|
||||||
echo "e2e tests failed after $max_iteration attempts"
|
|
||||||
fi
|
|
||||||
|
|
||||||
runHook postCheck
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.updateScript = nix-update-script { };
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
ldflags = [
|
|
||||||
"-s"
|
|
||||||
"-w"
|
|
||||||
"-X main.version=${version}"
|
|
||||||
"-X main.commit=${version}"
|
|
||||||
"-X main.date=${date}"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/tellerops/teller/";
|
homepage = "https://github.com/tellerops/teller/";
|
||||||
description = "Cloud native secrets management for developers";
|
description = "Cloud native secrets management for developers";
|
||||||
mainProgram = "teller";
|
mainProgram = "teller";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ wahtique ];
|
maintainers = with maintainers; [
|
||||||
|
cameronraysmith
|
||||||
|
wahtique
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user