1 { lib, stdenv, fetchFromGitHub, autoreconfHook, payload ? null }:
5 version = "1.0.0-unstable-2024-10-09";
7 src = fetchFromGitHub {
10 rev = "abadfdc507d5a75b6272dc360e70a80a510c758a";
11 sha256 = "sha256-02qcj0TAs7g4CSorWWbUzouS6mNthUOSdeocibw5g2A=";
14 nativeBuildInputs = [ autoreconfHook ];
21 configureScript = "../configure";
23 configureFlags = lib.optional (payload != null)
24 "--with-payload=${payload}";
26 hardeningDisable = [ "all" ];
28 # pk by default installs things in $out/$target_prefix/{bin,include,lib},
29 # we want to remove the target prefix directory hierarchy
31 mv $out/* $out/.cleanup
32 mv $out/.cleanup/* $out
37 description = "RISC-V Proxy Kernel and Bootloader";
38 homepage = "https://github.com/riscv/riscv-pk";
39 license = lib.licenses.bsd3;
40 platforms = lib.platforms.riscv;
41 maintainers = [ lib.maintainers.shlevy ];