2
0
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 23:23:07 +00:00
nixpkgs/pkgs/misc/opensbi/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.0 KiB
Nix
Raw Normal View History

2023-01-05 01:09:00 +00:00
{ lib
, stdenv
, fetchFromGitHub
, python3
, withPlatform ? "generic"
, withPayload ? null
, withFDT ? null
}:
stdenv.mkDerivation rec {
pname = "opensbi";
version = "1.3.1";
src = fetchFromGitHub {
owner = "riscv-software-src";
repo = "opensbi";
rev = "v${version}";
hash = "sha256-JNkPvmKYd5xbGB2lsZKWrpI6rBIckWbkLYu98bw7+QY=";
};
2022-06-26 01:52:27 +00:00
postPatch = ''
patchShebangs ./scripts
'';
2023-01-05 01:09:00 +00:00
nativeBuildInputs = [ python3 ];
installFlags = [
"I=$(out)"
];
makeFlags = [
"PLATFORM=${withPlatform}"
] ++ lib.optionals (withPayload != null) [
"FW_PAYLOAD_PATH=${withPayload}"
] ++ lib.optionals (withFDT != null) [
"FW_FDT_PATH=${withFDT}"
];
dontStrip = true;
dontPatchELF = true;
meta = with lib; {
description = "RISC-V Open Source Supervisor Binary Interface";
homepage = "https://github.com/riscv-software-src/opensbi";
license = licenses.bsd2;
maintainers = with maintainers; [ ius nickcao zhaofengli ];
2023-11-22 10:20:34 +00:00
platforms = [ "riscv64-linux" "riscv32-linux" ];
};
}