summary refs log tree commit diff
path: root/pkgs/development/libraries/waffle
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/libraries/waffle
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/libraries/waffle')
-rw-r--r--pkgs/development/libraries/waffle/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs/development/libraries/waffle/default.nix b/pkgs/development/libraries/waffle/default.nix
new file mode 100644
index 00000000000..e6d8a98b533
--- /dev/null
+++ b/pkgs/development/libraries/waffle/default.nix
@@ -0,0 +1,71 @@
+{ stdenv
+, fetchFromGitLab
+, lib
+, cmake
+, meson
+, ninja
+, bash-completion
+, libGL
+, libglvnd
+, makeWrapper
+, pkg-config
+, python3
+, x11Support ? true, libxcb, libX11
+, waylandSupport ? true, wayland, wayland-protocols
+, useGbm ? true, mesa, udev
+}:
+
+stdenv.mkDerivation rec {
+  pname = "waffle";
+  version = "1.7.0";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "mesa";
+    repo = "waffle";
+    rev = "v${version}";
+    sha256 = "iY+dAgXutD/uDFocwd9QXjq502IOsk+3RQMA2S/CMV4=";
+  };
+
+  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
+    mesa
+  ];
+
+  dontUseCmakeConfigure = true;
+
+  nativeBuildInputs = [
+    cmake
+    makeWrapper
+    meson
+    ninja
+    pkg-config
+    python3
+  ];
+
+  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 = "A cross-platform C library that allows one to defer selection of an OpenGL API and window system until runtime";
+    homepage = "http://www.waffle-gl.org/";
+    license = licenses.bsd2;
+    platforms = platforms.mesaPlatforms;
+    maintainers = with maintainers; [ Flakebi ];
+  };
+}