From cb6a25db0aff4548469d13a2c21b6daa5ba1844e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 14 Jan 2018 15:38:36 +0100 Subject: [PATCH] spectre-meltdown-checker: init at 0.29 --- .../spectre-meltdown-checker/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/tools/security/spectre-meltdown-checker/default.nix diff --git a/pkgs/tools/security/spectre-meltdown-checker/default.nix b/pkgs/tools/security/spectre-meltdown-checker/default.nix new file mode 100644 index 00000000000..9c12a4fa106 --- /dev/null +++ b/pkgs/tools/security/spectre-meltdown-checker/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper, binutils-unwrapped }: + +stdenv.mkDerivation rec { + name = "spectre-meltdown-checker-${version}"; + version = "0.29"; + + src = fetchFromGitHub { + owner = "speed47"; + repo = "spectre-meltdown-checker"; + rev = "v${version}"; + sha256 = "14i9gx1ngs3ixjirlx4qd87pmac916rvv9y61a5f7nl0dig4awl4"; + }; + + patches = fetchpatch { + url = "https://github.com/speed47/spectre-meltdown-checker/pull/79.patch"; + sha256 = "185kac5r97s3dnihgpwx4aashnzffb1f09xv9jw409g7i6cv2sq9"; + }; + + prePatch = '' + substituteInPlace spectre-meltdown-checker.sh \ + --replace /bin/echo echo + ''; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = with stdenv.lib; '' + install -Dt $out/lib spectre-meltdown-checker.sh + makeWrapper $out/lib/spectre-meltdown-checker.sh $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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b90f81a197..c6063ac59d2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4627,6 +4627,8 @@ with pkgs; sparsehash = callPackage ../development/libraries/sparsehash { }; + spectre-meltdown-checker = callPackage ../tools/security/spectre-meltdown-checker { }; + spiped = callPackage ../tools/networking/spiped { }; sqliteman = callPackage ../applications/misc/sqliteman { };