about summary refs log tree commit diff
path: root/pkgs/misc/riscv-pk/default.nix
blob: 5f0d1fa438f4180a4bcd1e083a6f6b11846e3058 (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
30
31
32
33
34
35
{ stdenv, fetchFromGitHub, autoreconfHook, payload ? null }: let
  rev = "e5846a2bc707eaa58dc8ab6a8d20a090c6ee8570";
  sha256 = "1clynpp70fnbgsjgxx7xi0vrdrj1v0h8zpv0x26i324kp2gwylf4";
  revCount = "438";
  shortRev = "e5846a2";
in stdenv.mkDerivation {
  name = "riscv-pk-0.1pre${revCount}_${shortRev}";

  src = fetchFromGitHub {
    owner = "riscv";
    repo = "riscv-pk";
    inherit rev sha256;
  };

  nativeBuildInputs = [ autoreconfHook ];

  preConfigure = ''
    mkdir build
    cd build
  '';

  configureScript = "../configure";

  configureFlags = stdenv.lib.optional (payload != null)
    "--with-payload=${payload}";

  hardeningDisable = [ "all" ];

  meta = {
    description = "RISC-V Proxy Kernel and Bootloader.";
    homepage = https://github.com/riscv/riscv-pk;
    license = stdenv.lib.licenses.bsd3;
    maintainers = [ stdenv.lib.maintainers.shlevy ];
  };
}