Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 58 lines 1.7 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6 stdenv, 7}: 8 9buildGoModule rec { 10 pname = "auth0-cli"; 11 version = "1.17.0"; 12 13 src = fetchFromGitHub { 14 owner = "auth0"; 15 repo = "auth0-cli"; 16 tag = "v${version}"; 17 hash = "sha256-Tt+7uWQ7SAC6R/gnvJDBkdLjXA60s1H5YSU8IPTNSnc="; 18 }; 19 20 vendorHash = "sha256-oyHERi5dpq/fEAgJ/RDapfDY918g3+VqFfqPpQDh+Cg="; 21 22 ldflags = [ 23 "-s" 24 "-w" 25 "-X=github.com/auth0/auth0-cli/internal/buildinfo.Version=v${version}" 26 "-X=github.com/auth0/auth0-cli/internal/buildinfo.Revision=0000000" 27 ]; 28 29 preCheck = '' 30 # Feed in all tests for testing 31 # This is because subPackages above limits what is built to just what we 32 # want but also limits the tests 33 unset subPackages 34 # Test requires network access 35 substituteInPlace internal/cli/universal_login_customize_test.go \ 36 --replace-fail "TestFetchUniversalLoginBrandingData" "SkipFetchUniversalLoginBrandingData" 37 ''; 38 39 nativeBuildInputs = [ installShellFiles ]; 40 41 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 42 installShellCompletion --cmd auth0 \ 43 --bash <($out/bin/auth0 completion bash) \ 44 --fish <($out/bin/auth0 completion fish) \ 45 --zsh <($out/bin/auth0 completion zsh) 46 ''; 47 48 subPackages = [ "cmd/auth0" ]; 49 50 meta = { 51 description = "Supercharge your developer workflow"; 52 homepage = "https://auth0.github.io/auth0-cli"; 53 changelog = "https://github.com/auth0/auth0-cli/releases/tag/v${version}"; 54 license = lib.licenses.mit; 55 maintainers = with lib.maintainers; [ matthewcroughan ]; 56 mainProgram = "auth0"; 57 }; 58}