python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / libraspberrypi / default.nix
blobb7e528301e8fc9967b774adcd464d28b250703dc
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchpatch
4 , cmake
5 , pkg-config
6 }:
8 stdenv.mkDerivation rec {
9   pname = "libraspberrypi";
10   version = "unstable-2022-03-23";
12   src = fetchFromGitHub {
13     owner = "raspberrypi";
14     repo = "userland";
15     rev = "c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e";
16     hash = "sha256-sAfpfq7C9HXVS7ym3UFIO6bpEIWFCOfVCSN2n5q1RNg=";
17   };
19   patches = [
20     (fetchpatch {
21       # https://github.com/raspberrypi/userland/pull/670
22       url = "https://github.com/raspberrypi/userland/commit/37cb44f314ab1209fe2a0a2449ef78893b1e5f62.patch";
23       sha256 = "1fbrbkpc4cc010ji8z4ll63g17n6jl67kdy62m74bhlxn72gg9rw";
24     })
25   ];
27   nativeBuildInputs = [ cmake pkg-config ];
28   cmakeFlags = [
29     (if (stdenv.hostPlatform.isAarch64) then "-DARM64=ON" else "-DARM64=OFF")
30     "-DVMCS_INSTALL_PREFIX=${placeholder "out"}"
31   ];
33   meta = with lib; {
34     description = "Userland tools & libraries for interfacing with Raspberry Pi hardware";
35     homepage = "https://github.com/raspberrypi/userland";
36     license = licenses.bsd3;
37     platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ];
38     maintainers = with maintainers; [ dezgeg tkerber ];
39   };