{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, pkgs, }: let inherit (lib.trivial) importJSON; versionSpec = importJSON ./version.json; versioning = import ../../../lib/versioning.nix { inherit lib pkgs; }; selected = versioning.selectVariant versionSpec null null; sources = versioning.mkAllSources selected; in stdenv.mkDerivation (_finalAttrs: { pname = "libraspberrypi"; version = "unstable-2024-12-23"; src = sources.userland; nativeBuildInputs = [ cmake pkg-config ]; cmakeFlags = [ # -DARM64=ON disables all targets that only build on 32-bit ARM; this allows # the package to build on aarch64 and other architectures "-DARM64=${if stdenv.hostPlatform.isAarch32 then "OFF" else "ON"}" "-DVMCS_INSTALL_PREFIX=${placeholder "out"}" (lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.10") ]; meta = with lib; { description = "ARM side libraries for interfacing to Raspberry Pi GPU (deprecated as of 27.08.2025)"; homepage = "https://github.com/raspberrypi/userland"; license = licenses.bsd3; platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "x86_64-linux" ]; maintainers = with maintainers; [ dezgeg tkerber ]; }; })