summary refs log tree commit diff
path: root/pkgs/os-specific/linux/firmware/raspberrypi/tools.nix
blob: 4685f6757179bb05397c106b9e712c4a1fa92575 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchFromGitHub, cmake, pkgconfig }:

stdenv.mkDerivation rec {
  name = "raspberrypi-tools-${version}";
  version = "2018-10-03";

  src = fetchFromGitHub {
    owner = "raspberrypi";
    repo = "userland";
    rev = "de4a7f2e3c391e2d3bc76af31864270e7802d9ac";
    sha256 = "0w96xa98ngdk9m6wv185w8waa7wm2hkn2bhxz52zd477hchzrxlg";
  };

  patches = [ ./tools-dont-install-sysv-init-scripts.patch ];

  nativeBuildInputs = [ cmake pkgconfig ];

  preConfigure = ''
    cmakeFlagsArray+=("-DVMCS_INSTALL_PREFIX=$out")
  '' + stdenv.lib.optionalString stdenv.isAarch64 ''
    cmakeFlagsArray+=("-DARM64=1")
  '';

  meta = with stdenv.lib; {
    description = "Userland tools for the Raspberry Pi board";
    homepage = https://github.com/raspberrypi/userland;
    license = licenses.bsd3;
    platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
    maintainers = with maintainers; [ dezgeg tavyc ];
  };
}