nixpkgs/pkgs/by-name/wa/waffle/package.nix
Silvan Mosberger 667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8ddeaf4f5219d2bae1d23b081e4906e57
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00

97 lines
1.8 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 ];
};
}