linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / libraspberrypi / default.nix
blobd4d69ed6afffabf115190417425c1b62db830b1b
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchpatch
4 , cmake
5 , pkg-config
6 }:
8 stdenv.mkDerivation rec {
9   pname = "libraspberrypi";
10   version = "unstable-2021-03-17";
12   src = fetchFromGitHub {
13     owner = "raspberrypi";
14     repo = "userland";
15     rev = "3fd8527eefd8790b4e8393458efc5f94eb21a615";
16     sha256 = "099qxh4bjzwd431ffpdhzx0gzlrkdyf66wplgkwg2rrfrc9zlv5a";
17   };
19   patches = [
20     (fetchpatch {
21       # https://github.com/raspberrypi/userland/pull/670
22       url = "https://github.com/raspberrypi/userland/pull/670/commits/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 tavyc tkerber ];
39   };