2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-12-29 15:07:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-29 15:07:52 +00:00
|
|
|
pname = "libraspberrypi";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "unstable-2021-10-25";
|
2020-12-29 15:07:52 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "userland";
|
2022-03-05 16:20:37 +00:00
|
|
|
rev = "0093675e4aa6e152a3ffc318b51a124e96eb287b";
|
|
|
|
sha256 = "qpooQy9k2UZ94KaqlFwurV+tt0GrBSRffGdlvMcn1XU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-29 15:07:52 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/raspberrypi/userland/pull/670
|
2021-06-04 09:07:49 +00:00
|
|
|
url = "https://github.com/raspberrypi/userland/commit/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch";
|
2020-12-29 15:07:52 +00:00
|
|
|
sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
cmakeFlags = [
|
|
|
|
(if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF")
|
|
|
|
"-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-29 15:07:52 +00:00
|
|
|
description = "Userland tools & libraries for interfacing with Raspberry Pi hardware";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/raspberrypi/userland";
|
|
|
|
license = licenses.bsd3;
|
2020-12-29 15:07:52 +00:00
|
|
|
platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ];
|
2021-04-25 03:57:28 +00:00
|
|
|
maintainers = with maintainers; [ dezgeg tkerber ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|