blob: 885282a4f6606ff846837850b497423b0ff23ef4 (
plain) (
tree)
|
|
{
stdenv,
fetchurl,
lib,
...
}:
let
version = "0.1.4";
sources = {
aarch64-darwin = {
url = "https://artifactory.rbx.com:443/artifactory/generic-rbx-local/hashi/${version}/bin/hashi_darwin-arm64";
sha256 = "sha256-FU7auH1BNdsJsHrWBytK7FJpOll9nx0i29Z5Jd18guI=";
};
};
in
stdenv.mkDerivation rec {
pname = "hashi";
inherit version;
src = fetchurl {
inherit (sources.${stdenv.hostPlatform.system})
url
sha256
;
};
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/hashi
chmod +x $out/bin/hashi
'';
dontUnpack = true;
dontStrip = true;
doInstallCheck = true;
installCheckPhase = ''
$out/bin/hashi -e sitetest3 version
'';
meta = with lib; {
description = "hashi command-line tool";
homepage = "http://go/hashicli";
license = licenses.unfree;
platforms = [ "aarch64-darwin" ];
};
}
|