diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8f250dfe4cf0..dfedfde86884 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -17282,6 +17282,15 @@ githubId = 5228243; name = "waelwindows"; }; + wahtique = { + name = "William Veal Phan"; + email = "williamvphan@yahoo.fr"; + github = "wahtique"; + githubId = 55251330; + keys = [{ + fingerprint = "9262 E3A7 D129 C4DD A7C1 26CE 370D D9BE 9121 F0B3"; + }]; + }; waiting-for-dev = { email = "marc@lamarciana.com"; github = "waiting-for-dev"; diff --git a/pkgs/development/tools/teller/default.nix b/pkgs/development/tools/teller/default.nix new file mode 100644 index 000000000000..893077722930 --- /dev/null +++ b/pkgs/development/tools/teller/default.nix @@ -0,0 +1,68 @@ +{ lib, buildGoModule, fetchFromGitHub, nix-update-script }: +let + pname = "teller"; + version = "1.5.6"; + date = "2022-10-13"; +in +buildGoModule { + inherit pname version; + + src = fetchFromGitHub { + owner = "tellerops"; + repo = pname; + rev = "v${version}"; + hash = "sha256-vgrfWKKXf4C4qkbGiB3ndtJy1VyTx2NJs2QiOSFFZkE="; + }; + + vendorHash = null; + + # use make instead of default checks because e2e does not work with `buildGoDir` + checkPhase = '' + runHook preCheck + # We do not set trimpath for tests, in case they reference test assets + export GOFLAGS=''${GOFLAGS//-trimpath/} + + make test + + # e2e tests can fail on first try + + max_iteration=3 + for i in $(seq 1 $max_iteration) + do + 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 { }; + + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + "-X main.commit=${version}" + "-X main.date=${date}" + ]; + + meta = with lib; { + homepage = "https://github.com/tellerops/teller/"; + description = "Cloud native secrets management for developers"; + license = licenses.asl20; + maintainers = with maintainers; [ wahtique ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 20dfda93bdef..6894c22f934e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17903,6 +17903,8 @@ with pkgs; phpunit = callPackage ../development/tools/misc/phpunit { }; + teller = callPackage ../development/tools/teller { }; + ### DEVELOPMENT / TOOLS / LANGUAGE-SERVERS ansible-language-server = callPackage ../development/tools/language-servers/ansible-language-server { };