2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-12-24 19:58:47 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
}:
|
2019-10-26 18:58:00 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-10 13:56:28 +00:00
|
|
|
pname = "libraspberrypi";
|
2021-02-17 03:59:15 +00:00
|
|
|
version = "unstable-2021-01-11";
|
2020-12-10 13:56:28 +00:00
|
|
|
|
2019-10-26 18:58:00 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "userland";
|
2021-02-17 03:59:15 +00:00
|
|
|
rev = "4a0a19b88b43e48c6b51b526b9378289fb712a4c";
|
|
|
|
sha256 = "0g3a1a7w717h0fwk39banzgjwphh62fx64k130w2s5885lsn5r5k";
|
2019-10-26 18:58:00 +01:00
|
|
|
};
|
|
|
|
|
2020-12-24 19:58:47 +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 ];
|
2020-12-10 13:56:28 +00:00
|
|
|
cmakeFlags = [
|
2020-12-24 19:59:14 +00:00
|
|
|
(if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF")
|
2020-12-28 15:49:46 +00:00
|
|
|
"-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
|
2020-12-10 13:56:28 +00:00
|
|
|
];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-12-24 19:58:47 +00:00
|
|
|
description = "Userland tools & libraries for interfacing with Raspberry Pi hardware";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/raspberrypi/userland";
|
2019-10-26 18:58:00 +01:00
|
|
|
license = licenses.bsd3;
|
2020-12-24 19:58:47 +00:00
|
|
|
platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ dezgeg tavyc tkerber ];
|
2019-10-26 18:58:00 +01:00
|
|
|
};
|
|
|
|
}
|