mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 17:23:08 +00:00
35 lines
1.0 KiB
Nix
35 lines
1.0 KiB
Nix
{ stdenv, fetchFromGitHub, makeWrapper, coreutils, binutils-unwrapped }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "spectre-meltdown-checker-${version}";
|
|
version = "0.37";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "speed47";
|
|
repo = "spectre-meltdown-checker";
|
|
rev = "v${version}";
|
|
sha256 = "0g1p12jbraj0q5qpvqnbg5v1jwlcx6h04xz5s7jds51l7gf5f9np";
|
|
};
|
|
|
|
prePatch = ''
|
|
substituteInPlace spectre-meltdown-checker.sh \
|
|
--replace /bin/echo ${coreutils}/bin/echo
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = with stdenv.lib; ''
|
|
install -D spectre-meltdown-checker.sh $out/bin/spectre-meltdown-checker
|
|
wrapProgram $out/bin/spectre-meltdown-checker \
|
|
--prefix PATH : ${makeBinPath [ binutils-unwrapped ]}
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Spectre & Meltdown vulnerability/mitigation checker for Linux";
|
|
homepage = https://github.com/speed47/spectre-meltdown-checker;
|
|
license = licenses.gpl3;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
};
|
|
}
|