summary refs log tree commit diff
path: root/pkgs/tools/system/rowhammer-test/default.nix
blob: 02462584c6508fdd90ba39bc22fad20c0c7cb2ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchFromGitHub }:

stdenv.mkDerivation {
  name = "rowhammer-test-20150811";

  src = fetchFromGitHub {
    owner = "google";
    repo = "rowhammer-test";
    rev = "c1d2bd9f629281402c10bb10e52bc1f1faf59cc4"; # 2015-08-11
    sha256 = "1fbfcnm5gjish47wdvikcsgzlb5vnlfqlzzm6mwiw2j5qkq0914i";
  };

  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-Wno-error=format";

  buildPhase = "sh -e make.sh";

  installPhase = ''
    mkdir -p $out/bin
    cp rowhammer_test double_sided_rowhammer $out/bin
  '';

  meta = with stdenv.lib; {
    description = "Test DRAM for bit flips caused by the rowhammer problem";
    homepage = "https://github.com/google/rowhammer-test";
    license = licenses.asl20;
    maintainers = [ maintainers.viric ];
    platforms = [ "x86_64-linux" "i686-linux" ];
  };
}