nixpkgs/pkgs/tools/security/spectre-meltdown-checker/default.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2018-01-21 15:53:35 +01:00
{ stdenv, fetchFromGitHub, makeWrapper, coreutils, binutils-unwrapped }:
2018-01-14 15:38:36 +01:00
stdenv.mkDerivation rec {
name = "spectre-meltdown-checker-${version}";
version = "0.40";
2018-01-14 15:38:36 +01:00
src = fetchFromGitHub {
owner = "speed47";
repo = "spectre-meltdown-checker";
rev = "v${version}";
sha256 = "0lhykc2andl0611bbs9b5dzp7c753crppvir2i7aw6bgwis23gjs";
2018-01-14 15:38:36 +01:00
};
prePatch = ''
substituteInPlace spectre-meltdown-checker.sh \
2018-01-14 22:50:42 +01:00
--replace /bin/echo ${coreutils}/bin/echo
2018-01-14 15:38:36 +01:00
'';
nativeBuildInputs = [ makeWrapper ];
installPhase = with stdenv.lib; ''
runHook preInstall
install -Dm755 spectre-meltdown-checker.sh $out/bin/spectre-meltdown-checker
2018-04-19 08:20:40 +02:00
wrapProgram $out/bin/spectre-meltdown-checker \
2018-01-14 15:38:36 +01:00
--prefix PATH : ${makeBinPath [ binutils-unwrapped ]}
runHook postInstall
2018-01-14 15:38:36 +01:00
'';
meta = with stdenv.lib; {
description = "Spectre & Meltdown vulnerability/mitigation checker for Linux";
homepage = https://github.com/speed47/spectre-meltdown-checker;
license = licenses.gpl3;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
2018-01-14 15:38:36 +01:00
};
}