2019-10-26 18:58:00 +01:00
|
|
|
{ stdenv, cmake, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "libraspberrypi";
|
2020-06-06 08:57:19 +01:00
|
|
|
version = "2020-05-28";
|
2019-10-26 18:58:00 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "raspberrypi";
|
|
|
|
repo = "userland";
|
2020-06-06 08:57:19 +01:00
|
|
|
rev = "f97b1af1b3e653f9da2c1a3643479bfd469e3b74";
|
|
|
|
sha256 = "1r7n05rv96hqjq0rn0qzchmfqs0j7vh3p8jalgh66s6l0vms5mwy";
|
2019-10-26 18:58:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
cmakeFlags = if (stdenv.targetPlatform.system == "aarch64-linux")
|
|
|
|
then "-DARM64=ON"
|
|
|
|
else "-DARM64=OFF";
|
|
|
|
preConfigure = ''cmakeFlags="$cmakeFlags -DVMCS_INSTALL_PREFIX=$out"'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Userland 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;
|
|
|
|
platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
|
|
|
|
maintainers = with maintainers; [ tkerber ];
|
|
|
|
};
|
|
|
|
}
|