diff options
author | John Ericson <git@JohnEricson.me> | 2020-12-22 18:56:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 18:56:19 -0500 |
commit | 2d2629f7d4a3948f7891c2206ea020562d1d7a1d (patch) | |
tree | 75c083a7db2c4e1d4b86162731b23439bbfe1500 | |
parent | 4b66d030e75a07572d5bad55e66ed88c86eb069f (diff) | |
parent | 807c0b0df59b597ed3682a06be00eb058b03bdb2 (diff) |
Merge pull request #107429 from dcbaker/wip/2020-12/waffle-use-meson
Cleanups for waffle
-rw-r--r-- | pkgs/development/libraries/waffle/default.nix | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pkgs/development/libraries/waffle/default.nix b/pkgs/development/libraries/waffle/default.nix index 66a1b7ab1450..0f1e36b35795 100644 --- a/pkgs/development/libraries/waffle/default.nix +++ b/pkgs/development/libraries/waffle/default.nix @@ -1,16 +1,23 @@ { stdenv , fetchFromGitLab , lib -, cmake +, meson +, ninja , libGL -, libglvnd +, libglvnd ? null , makeWrapper , pkg-config -, wayland -, libxcb -, libX11 +, python3 +, x11Support ? true, libxcb ? null, libX11 ? null +, waylandSupport ? true, wayland ? null +, useGbm ? true, mesa ? null, libudev ? null }: +assert x11Support -> (libxcb != null && libX11 != null); +assert waylandSupport -> wayland != null; +assert useGbm -> (mesa != null && libudev != null); +assert with stdenv.hostPlatform; isUnix && !isDarwin -> libglvnd != null; + stdenv.mkDerivation rec { pname = "waffle"; version = "1.6.1"; @@ -25,20 +32,26 @@ stdenv.mkDerivation rec { buildInputs = [ libGL + ] ++ stdenv.lib.optionals (with stdenv.hostPlatform; isUnix && !isDarwin) [ libglvnd + ] ++ stdenv.lib.optionals x11Support [ libX11 libxcb + ] ++ stdenv.lib.optionals waylandSupport [ wayland + ] ++ stdenv.lib.optionals useGbm [ + mesa + libudev ]; nativeBuildInputs = [ - cmake + meson + ninja makeWrapper pkg-config + python3 ]; - cmakeFlags = [ "-Dplatforms=x11,wayland" ]; - postInstall = '' wrapProgram $out/bin/wflinfo \ --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libGL libglvnd ]} |