ssm-session-manager-plugin: 1.2.7.0 -> 1.2.54.0
This commit is contained in:
parent
3531b9c870
commit
610e40b503
1 changed files with 18 additions and 15 deletions
|
@ -1,17 +1,14 @@
|
||||||
{ stdenv, lib, fetchurl, autoPatchelfHook, dpkg, awscli, unzip }:
|
{ stdenv, lib, fetchurl, autoPatchelfHook, dpkg, awscli, unzip }:
|
||||||
let
|
let
|
||||||
ver = "1.2.7.0";
|
ver = "1.2.54.0";
|
||||||
source = if stdenv.isDarwin then {
|
source =
|
||||||
url =
|
if stdenv.isDarwin then {
|
||||||
"https://s3.amazonaws.com/session-manager-downloads/plugin/${ver}/mac/sessionmanager-bundle.zip";
|
url = "https://s3.amazonaws.com/session-manager-downloads/plugin/${ver}/mac/sessionmanager-bundle.zip";
|
||||||
sha256 = "sha256-HP+opNjS53zR9eUxpNUHGD9rZN1z7lDc6+nONR8fa/s=";
|
sha256 = "kgxoQrtu2tsV5t/3oA+Z2juY24hPOznPGjlQMsqOIZg=";
|
||||||
} else {
|
} else {
|
||||||
url =
|
url = "https://s3.amazonaws.com/session-manager-downloads/plugin/${ver}/ubuntu_64bit/session-manager-plugin.deb";
|
||||||
"https://s3.amazonaws.com/session-manager-downloads/plugin/${ver}/ubuntu_64bit/session-manager-plugin.deb";
|
sha256 = "uug1cT4yRxNQcf+zWz0mi72G4EGa3eZHVuG36INSqrM=";
|
||||||
sha256 = "sha256-EZ9ncj1YYlod1RLfXOpZFijnKjLYWYVBb+C6yd42l34=";
|
};
|
||||||
};
|
|
||||||
platformBuildInput = if stdenv.isDarwin then [ unzip ] else [ dpkg ];
|
|
||||||
unpackCmd = if stdenv.isDarwin then "unzip $src" else "dpkg-deb -x $src .";
|
|
||||||
archivePath = if stdenv.isDarwin then "sessionmanager-bundle" else "usr/local/sessionmanagerplugin";
|
archivePath = if stdenv.isDarwin then "sessionmanager-bundle" else "usr/local/sessionmanagerplugin";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -20,13 +17,19 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
src = fetchurl source;
|
src = fetchurl source;
|
||||||
|
|
||||||
nativeBuildInputs = [ autoPatchelfHook ] ++ platformBuildInput;
|
nativeBuildInputs = [ autoPatchelfHook ] ++ (if stdenv.isDarwin then [ unzip ] else [ dpkg ]);
|
||||||
|
|
||||||
buildInputs = [ awscli ];
|
buildInputs = [ awscli ];
|
||||||
|
|
||||||
unpackPhase = unpackCmd;
|
unpackPhase = if stdenv.isDarwin then "unzip $src" else "dpkg-deb -x $src .";
|
||||||
|
|
||||||
installPhase = "install -m755 -D ${archivePath}/bin/session-manager-plugin $out/bin/session-manager-plugin";
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
install -m755 -D ${archivePath}/bin/session-manager-plugin $out/bin/session-manager-plugin
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage =
|
homepage =
|
||||||
|
|
Loading…
Reference in a new issue