nixpkgs/pkgs/tools/admin/aws-auth/default.nix

32 lines
859 B
Nix
Raw Normal View History

2017-07-26 18:13:57 +02:00
{ stdenv, fetchFromGitHub, makeWrapper, jq, awscli }:
stdenv.mkDerivation rec {
version = "unstable-2017-07-24";
name = "aws-auth-${version}";
src = fetchFromGitHub {
owner = "alphagov";
repo = "aws-auth";
rev = "5a4c9673f9f00ebaa4bb538827e1c2f277c475e1";
sha256 = "095j9zqxra8hi2iyz0y4azs9yigy5f6alqkfmv180pm75nbc031g";
};
2017-07-26 18:45:01 +02:00
nativeBuildInputs = [ makeWrapper ];
2017-07-26 18:13:57 +02:00
2017-07-26 18:45:01 +02:00
dontBuild = true;
2017-07-26 18:13:57 +02:00
# copy script and set $PATH
installPhase = ''
2017-07-26 18:45:01 +02:00
install -D $src/aws-auth.sh $out/bin/aws-auth
wrapProgram $out/bin/aws-auth \
--prefix PATH : ${stdenv.lib.makeBinPath [ awscli jq ]}
2017-07-26 18:13:57 +02:00
'';
meta = {
homepage = https://github.com/alphagov/aws-auth;
description = "AWS authentication wrapper to handle MFA and IAM roles";
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ ris ];
};
}