msecli: init at 10.01.012024.00 (#328352)

This commit is contained in:
Peder Bergebakken Sundt 2024-09-18 01:18:47 +02:00 committed by GitHub
commit e22fb20b15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,65 @@
{
autoPatchelfHook,
buildFHSEnv,
fetchurl,
lib,
stdenv,
zlib,
}:
let
pname = "msecli";
version = "10.01.012024.00";
src = fetchurl {
url = "https://web.archive.org/web/20240916144249/https://www.micron.com/content/dam/micron/global/public/products/software/storage-executive-software/msecli/msecli-linux.run";
hash = "sha256-IszdD/9fAh+JA26bSR1roXSo8LDU/rf4CuRI3HjU1xc=";
};
buildEnv = buildFHSEnv { name = "msecli-buildEnv"; };
in
stdenv.mkDerivation {
inherit pname version src;
buildInputs = [ zlib ];
nativeBuildInputs = [ autoPatchelfHook ];
unpackPhase = ''
runHook preUnpack
cp "$src" ${src.name}
chmod +x ${src.name}
runHook postUnpack
'';
buildPhase = ''
runHook prebuild
# ignore the exit code as the installer
# fails at optional steps due to read only FHS
${buildEnv}/bin/${buildEnv.name} -c "./${src.name} --mode unattended --prefix bin || true"
runHook postbuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -v bin/msecli $out/bin
runHook postInstall
'';
meta = {
description = "Micron Storage Executive CLI";
homepage = "https://www.micron.com/sales-support/downloads/software-drivers/storage-executive-software";
license = lib.licenses.unfree;
mainProgram = "msecli";
maintainers = with lib.maintainers; [ diadatp ];
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}