2018-02-19 17:37:46 +00:00
|
|
|
{ stdenv, fetchFromGitHub, autoreconfHook, payload ? null }: let
|
2018-02-18 23:11:03 +00:00
|
|
|
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";
|
|
|
|
|
2018-02-19 17:37:46 +00:00
|
|
|
configureFlags = stdenv.lib.optional (payload != null)
|
|
|
|
"--with-payload=${payload}";
|
|
|
|
|
2018-02-18 23:11:03 +00:00
|
|
|
hardeningDisable = [ "all" ];
|
|
|
|
|
2018-02-20 15:29:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
mv $out/* $out/.cleanup
|
|
|
|
mv $out/.cleanup/* $out
|
|
|
|
rmdir $out/.cleanup
|
|
|
|
'';
|
|
|
|
|
2018-02-18 23:11:03 +00:00
|
|
|
meta = {
|
|
|
|
description = "RISC-V Proxy Kernel and Bootloader.";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/riscv/riscv-pk";
|
2018-02-18 23:11:03 +00:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2018-03-24 12:44:26 +00:00
|
|
|
platforms = stdenv.lib.platforms.riscv;
|
2018-02-19 00:28:23 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
2018-02-18 23:11:03 +00:00
|
|
|
};
|
|
|
|
}
|