2020-03-27 07:33:21 +00:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub }:
|
2018-06-26 08:29:49 +01:00
|
|
|
|
2019-12-19 08:19:17 +00:00
|
|
|
buildGoModule rec {
|
2019-07-09 08:40:22 +01:00
|
|
|
pname = "saml2aws";
|
2020-07-02 19:48:42 +01:00
|
|
|
version = "2.26.2";
|
2018-06-26 08:29:49 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Versent";
|
|
|
|
repo = "saml2aws";
|
2019-12-19 08:19:17 +00:00
|
|
|
rev = "v${version}";
|
2020-07-02 19:48:42 +01:00
|
|
|
sha256 = "0y5gvdrdr6i9spdwsxvzs1bxs32icxpkqxnglp1bf4gglc580d87";
|
2018-06-26 08:29:49 +01:00
|
|
|
};
|
|
|
|
|
2020-05-01 02:59:00 +01:00
|
|
|
hid = fetchFromGitHub {
|
|
|
|
owner = "karalabe";
|
|
|
|
repo = "hid";
|
|
|
|
rev = "9c14560f9ee858c43f40b5cd01392b167aacf4e8";
|
|
|
|
sha256 = "0xc7b8mwha64j7l2fr2g5zy8pz7cqi0vrxx60gii52b6ii31xncx";
|
|
|
|
};
|
|
|
|
|
2020-07-02 19:48:42 +01:00
|
|
|
vendorSha256 = "0f81nrg8v3xh2hcx7g77p3ahr4gyj042bwr1knf2phpahgz9n9rn";
|
2020-05-01 02:59:00 +01:00
|
|
|
overrideModAttrs = (_: {
|
|
|
|
postBuild = ''
|
|
|
|
cp -r --reflink=auto ${hid}/libusb vendor/github.com/karalabe/hid
|
|
|
|
cp -r --reflink=auto ${hid}/hidapi vendor/github.com/karalabe/hid
|
|
|
|
'';
|
|
|
|
});
|
2019-12-19 08:19:17 +00:00
|
|
|
|
|
|
|
subPackages = [ "." "cmd/saml2aws" ];
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=-X main.Version=${version}
|
|
|
|
'';
|
|
|
|
|
2018-06-26 08:29:49 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP";
|
2019-12-19 08:19:17 +00:00
|
|
|
homepage = "https://github.com/Versent/saml2aws";
|
2018-06-26 08:29:49 +01:00
|
|
|
license = licenses.mit;
|
2019-02-17 13:00:33 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2018-06-26 08:29:49 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.pmyjavec ];
|
|
|
|
};
|
2020-05-01 02:59:00 +01:00
|
|
|
}
|