Files
nix-config/packages/raspberrypi/libraspberrypi/default.nix
mjallen18 70002a19e2 hmm
2026-04-07 18:39:42 -05:00

51 lines
1.2 KiB
Nix
Executable File

{
lib,
stdenv,
cmake,
pkg-config,
namespace,
pkgs,
}:
let
inherit (lib.trivial) importJSON;
inherit (lib.${namespace}) selectVariant mkAllSources;
versionSpec = importJSON ./version.json;
selected = selectVariant versionSpec null null;
sources = mkAllSources pkgs 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
];
};
})