Files
nixpkgs/pkgs/by-name/wa/waffle/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

95 lines
1.7 KiB
Nix

{
stdenv,
fetchFromGitLab,
lib,
cmake,
meson,
ninja,
bash-completion,
libGL,
libglvnd,
makeWrapper,
pkg-config,
python3,
x11Support ? true,
libxcb,
libX11,
waylandSupport ? true,
wayland,
wayland-protocols,
wayland-scanner,
useGbm ? true,
libgbm,
udev,
}:
stdenv.mkDerivation rec {
pname = "waffle";
version = "1.8.1";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "libgbm";
repo = "waffle";
rev = "v${version}";
sha256 = "sha256-Y7GRYLqSO572qA1eZ3jS8QlZ1X9xKpDtScaySTuPK/U=";
};
buildInputs = [
bash-completion
libGL
]
++ lib.optionals (with stdenv.hostPlatform; isUnix && !isDarwin) [
libglvnd
]
++ lib.optionals x11Support [
libX11
libxcb
]
++ lib.optionals waylandSupport [
wayland
wayland-protocols
]
++ lib.optionals useGbm [
udev
libgbm
];
depsBuildBuild = [ pkg-config ];
dontUseCmakeConfigure = true;
nativeBuildInputs = [
cmake
makeWrapper
meson
ninja
pkg-config
python3
]
++ lib.optionals waylandSupport [
wayland-scanner
];
PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR = "${placeholder "out"}/share/bash-completion/completions";
postInstall = ''
wrapProgram $out/bin/wflinfo \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
libGL
libglvnd
]
}
'';
meta = with lib; {
description = "Cross-platform C library that allows one to defer selection of an OpenGL API and window system until runtime";
mainProgram = "wflinfo";
homepage = "https://www.waffle-gl.org/";
license = licenses.bsd2;
inherit (libgbm.meta) platforms;
maintainers = with maintainers; [ Flakebi ];
};
}