0d9fc34957
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
40 lines
1.2 KiB
Nix
40 lines
1.2 KiB
Nix
{ lib, stdenv
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, cmake
|
|
, pkg-config
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libraspberrypi";
|
|
version = "unstable-2022-06-16";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "raspberrypi";
|
|
repo = "userland";
|
|
rev = "54fd97ae4066a10b6b02089bc769ceed328737e0";
|
|
hash = "sha512-f7tBgIykcIdkwcFjBKk5ooD/5Bsyrd/0OFr7LNCwWFYeE4DH3XA7UR7YjArkwqUVCVBByr82EOaacw0g1blOkw==";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
# https://github.com/raspberrypi/userland/pull/670
|
|
url = "https://github.com/raspberrypi/userland/commit/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch";
|
|
sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
cmakeFlags = [
|
|
(if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF")
|
|
"-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Userland tools & libraries for interfacing with Raspberry Pi hardware";
|
|
homepage = "https://github.com/raspberrypi/userland";
|
|
license = licenses.bsd3;
|
|
platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ];
|
|
maintainers = with maintainers; [ dezgeg tkerber ];
|
|
};
|
|
}
|