1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 14:47:06 +00:00
nixpkgs/pkgs/tools/security/spectre-meltdown-checker/default.nix

35 lines
1 KiB
Nix
Raw Normal View History

2018-01-21 14:53:35 +00:00
{ stdenv, fetchFromGitHub, makeWrapper, coreutils, binutils-unwrapped }:
2018-01-14 14:38:36 +00:00
stdenv.mkDerivation rec {
name = "spectre-meltdown-checker-${version}";
2018-08-16 03:32:23 +01:00
version = "0.39";
2018-01-14 14:38:36 +00:00
src = fetchFromGitHub {
owner = "speed47";
repo = "spectre-meltdown-checker";
rev = "v${version}";
2018-08-16 03:32:23 +01:00
sha256 = "1llp6iyvbykn9w7vnz1jklmy6gmbksk234b46mzjfvg7mvg91dc5";
2018-01-14 14:38:36 +00:00
};
prePatch = ''
substituteInPlace spectre-meltdown-checker.sh \
2018-01-14 21:50:42 +00:00
--replace /bin/echo ${coreutils}/bin/echo
2018-01-14 14:38:36 +00:00
'';
nativeBuildInputs = [ makeWrapper ];
installPhase = with stdenv.lib; ''
2018-04-19 07:20:40 +01:00
install -D spectre-meltdown-checker.sh $out/bin/spectre-meltdown-checker
wrapProgram $out/bin/spectre-meltdown-checker \
2018-01-14 14:38:36 +00:00
--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 ];
};
}