571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, python3
|
|
, withPlatform ? "generic"
|
|
, withPayload ? null
|
|
, withFDT ? null
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "opensbi";
|
|
version = "1.5.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "riscv-software-src";
|
|
repo = "opensbi";
|
|
rev = "v${version}";
|
|
hash = "sha256-qb3orbmZJtesIBj9F2OX+BhrlctymZA1ZIbV/GVa0lU=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs ./scripts
|
|
'';
|
|
|
|
nativeBuildInputs = [ python3 ];
|
|
|
|
installFlags = [
|
|
"I=$(out)"
|
|
];
|
|
|
|
makeFlags = [
|
|
"PLATFORM=${withPlatform}"
|
|
] ++ lib.optionals (withPayload != null) [
|
|
"FW_PAYLOAD_PATH=${withPayload}"
|
|
] ++ lib.optionals (withFDT != null) [
|
|
"FW_FDT_PATH=${withFDT}"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
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 ];
|
|
platforms = [ "riscv64-linux" "riscv32-linux" ];
|
|
};
|
|
}
|