Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, fetchFromGitHub 3, cmake 4, pkg-config 5}: 6 7stdenv.mkDerivation rec { 8 pname = "libraspberrypi"; 9 version = "unstable-2022-06-16"; 10 11 src = fetchFromGitHub { 12 owner = "raspberrypi"; 13 repo = "userland"; 14 rev = "54fd97ae4066a10b6b02089bc769ceed328737e0"; 15 hash = "sha512-f7tBgIykcIdkwcFjBKk5ooD/5Bsyrd/0OFr7LNCwWFYeE4DH3XA7UR7YjArkwqUVCVBByr82EOaacw0g1blOkw=="; 16 }; 17 18 nativeBuildInputs = [ cmake pkg-config ]; 19 cmakeFlags = [ 20 # -DARM64=ON disables all targets that only build on 32-bit ARM; this allows 21 # the package to build on aarch64 and other architectures 22 "-DARM64=${if stdenv.hostPlatform.isAarch32 then "OFF" else "ON"}" 23 "-DVMCS_INSTALL_PREFIX=${placeholder "out"}" 24 ]; 25 26 meta = with lib; { 27 description = "Userland tools & libraries for interfacing with Raspberry Pi hardware"; 28 homepage = "https://github.com/raspberrypi/userland"; 29 license = licenses.bsd3; 30 platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ]; 31 maintainers = with maintainers; [ dezgeg tkerber ]; 32 }; 33}