2020-12-29 15:07:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, 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";
|
|
|
|
version = "unstable-2020-11-30";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "userland";
|
2020-12-29 15:07:52 +00:00
|
|
|
rev = "093b30bbc2fd083d68cc3ee07e6e555c6e592d11";
|
|
|
|
sha256 = "0n2psqyxlsic9cc5s8h65g0blblw3xws4czhpbbgjm58px3822d7";
|
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
|
|
|
|
url = "https://github.com/raspberrypi/userland/pull/670/commits/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch";
|
|
|
|
sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
cmakeFlags = [
|
|
|
|
(if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF")
|
|
|
|
"-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with stdenv.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" ];
|
|
|
|
maintainers = with maintainers; [ dezgeg tavyc tkerber ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|