Files
nixpkgs/pkgs/by-name/au/auth0-cli/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

61 lines
1.7 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
stdenv,
}:
buildGoModule rec {
pname = "auth0-cli";
version = "1.21.0";
src = fetchFromGitHub {
owner = "auth0";
repo = "auth0-cli";
tag = "v${version}";
hash = "sha256-HII1qRJ4or5gncSVUA41DmkC8EQ9w6fdmMM15JTUFsw=";
};
vendorHash = "sha256-g/vpUbtWFKyoPObpd9yOdsbzD/8d0SjAUZzL7A92bio=";
ldflags = [
"-s"
"-w"
"-X=github.com/auth0/auth0-cli/internal/buildinfo.Version=v${version}"
"-X=github.com/auth0/auth0-cli/internal/buildinfo.Revision=0000000"
];
preCheck = ''
# Feed in all tests for testing
# This is because subPackages above limits what is built to just what we
# want but also limits the tests
unset subPackages
# Test requires network access
substituteInPlace internal/cli/universal_login_customize_test.go \
--replace-fail "TestFetchUniversalLoginBrandingData" "SkipFetchUniversalLoginBrandingData"
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd auth0 \
--bash <($out/bin/auth0 completion bash) \
--fish <($out/bin/auth0 completion fish) \
--zsh <($out/bin/auth0 completion zsh)
'';
subPackages = [ "cmd/auth0" ];
__darwinAllowLocalNetworking = true;
meta = {
description = "Supercharge your developer workflow";
homepage = "https://auth0.github.io/auth0-cli";
changelog = "https://github.com/auth0/auth0-cli/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ matthewcroughan ];
mainProgram = "auth0";
};
}