nixpkgs/pkgs/misc/riscv-pk/default.nix

43 lines
1,011 B
Nix
Raw Normal View History

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