nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 46 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 buildGoModule, 5 fetchFromGitHub, 6 installShellFiles, 7}: 8 9buildGoModule rec { 10 pname = "saml2aws"; 11 version = "2.36.19"; 12 13 src = fetchFromGitHub { 14 owner = "Versent"; 15 repo = "saml2aws"; 16 rev = "v${version}"; 17 sha256 = "sha256-5g7mbjBkjNl1xvMMJXcITOZTNWXE7m2WhzzvLuULcuo="; 18 }; 19 20 vendorHash = "sha256-oCYtEMx3+wK1TyS18iYgRwH3NopWY63xsguvanNDSEo="; 21 22 nativeBuildInputs = [ installShellFiles ]; 23 24 subPackages = [ 25 "." 26 "cmd/saml2aws" 27 ]; 28 29 ldflags = [ 30 "-X main.Version=${version}" 31 ]; 32 33 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 34 installShellCompletion --cmd saml2aws \ 35 --bash <($out/bin/saml2aws --completion-script-bash) \ 36 --zsh <($out/bin/saml2aws --completion-script-zsh) 37 ''; 38 39 meta = with lib; { 40 description = "CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP"; 41 mainProgram = "saml2aws"; 42 homepage = "https://github.com/Versent/saml2aws"; 43 license = licenses.mit; 44 maintainers = [ lib.maintainers.pmyjavec ]; 45 }; 46}