nixpkgs/pkgs/by-name/wa/waffle/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

77 lines
1.6 KiB
Nix
Raw Normal View History

2020-10-28 10:16:22 +00:00
{ stdenv
, fetchFromGitLab
, lib
2021-03-23 12:15:15 +00:00
, cmake
, meson
, ninja
2021-03-23 12:15:15 +00:00
, bash-completion
2020-10-28 10:16:22 +00:00
, libGL
2021-03-23 12:15:15 +00:00
, libglvnd
2020-10-28 10:16:22 +00:00
, makeWrapper
, pkg-config
, python3
2021-03-23 12:15:15 +00:00
, x11Support ? true, libxcb, libX11
, waylandSupport ? true, wayland, wayland-protocols, wayland-scanner
2021-03-23 12:15:15 +00:00
, useGbm ? true, mesa, udev
2020-10-28 10:16:22 +00:00
}:
stdenv.mkDerivation rec {
pname = "waffle";
2024-07-31 04:06:57 +00:00
version = "1.8.1";
2020-10-28 10:16:22 +00:00
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "mesa";
repo = "waffle";
rev = "v${version}";
2024-07-31 04:06:57 +00:00
sha256 = "sha256-Y7GRYLqSO572qA1eZ3jS8QlZ1X9xKpDtScaySTuPK/U=";
2020-10-28 10:16:22 +00:00
};
buildInputs = [
2021-03-23 12:15:15 +00:00
bash-completion
2020-10-28 10:16:22 +00:00
libGL
] ++ lib.optionals (with stdenv.hostPlatform; isUnix && !isDarwin) [
2020-10-28 10:16:22 +00:00
libglvnd
] ++ lib.optionals x11Support [
2020-10-28 10:16:22 +00:00
libX11
libxcb
] ++ lib.optionals waylandSupport [
2020-10-28 10:16:22 +00:00
wayland
2021-03-23 12:15:15 +00:00
wayland-protocols
] ++ lib.optionals useGbm [
2021-03-23 12:15:15 +00:00
udev
mesa
2020-10-28 10:16:22 +00:00
];
depsBuildBuild = [ pkg-config ];
2021-03-23 12:15:15 +00:00
dontUseCmakeConfigure = true;
2020-10-28 10:16:22 +00:00
nativeBuildInputs = [
2021-03-23 12:15:15 +00:00
cmake
makeWrapper
meson
ninja
2020-10-28 10:16:22 +00:00
pkg-config
python3
] ++ lib.optionals waylandSupport [
wayland-scanner
2020-10-28 10:16:22 +00:00
];
2021-03-23 12:15:15 +00:00
PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions";
2020-10-28 10:16:22 +00:00
postInstall = ''
wrapProgram $out/bin/wflinfo \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL libglvnd ]}
2020-10-28 10:16:22 +00:00
'';
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/";
2020-10-28 10:16:22 +00:00
license = licenses.bsd2;
inherit (mesa.meta) platforms;
2020-10-28 10:16:22 +00:00
maintainers = with maintainers; [ Flakebi ];
};
}