git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107429 from dcbaker/wip/2020-12/waffle-use-meson

Cleanups for waffle

commit2d2629f7d4a3948f7891c2206ea020562d1d7a1d authorJohn Ericson <git@JohnEricson.me> dateTue 22 Dec 2020, 18:56 (6 years ago) parent4b66d03807c0b0
1 file changed+21−8
pkgs/development/libraries/waffle/default.nix+21−8
pkgs/development/libraries/waffle/default.nix+21−8
@@ -1,16 +1,23 @@
11{ stdenv
22, fetchFromGitLab
33, lib
4−, cmake
4+, meson
5+, ninja
56, libGL
6−, libglvnd
7+, libglvnd ? null
78, makeWrapper
89, pkg-config
9−, wayland
10−, libxcb
11−, libX11
10+, python3
11+, x11Support ? true, libxcb ? null, libX11 ? null
12+, waylandSupport ? true, wayland ? null
13+, useGbm ? true, mesa ? null, libudev ? null
1214}:
1315
16+assert x11Support -> (libxcb != null && libX11 != null);
17+assert waylandSupport -> wayland != null;
18+assert useGbm -> (mesa != null && libudev != null);
19+assert with stdenv.hostPlatform; isUnix && !isDarwin -> libglvnd != null;
20+
1421stdenv.mkDerivation rec {
1522 pname = "waffle";
1623 version = "1.6.1";
@@ -25,20 +32,26 @@ stdenv.mkDerivation rec {
2532
2633 buildInputs = [
2734 libGL
35+ ] ++ stdenv.lib.optionals (with stdenv.hostPlatform; isUnix && !isDarwin) [
2836 libglvnd
37+ ] ++ stdenv.lib.optionals x11Support [
2938 libX11
3039 libxcb
40+ ] ++ stdenv.lib.optionals waylandSupport [
3141 wayland
42+ ] ++ stdenv.lib.optionals useGbm [
43+ mesa
44+ libudev
3245 ];
3346
3447 nativeBuildInputs = [
35− cmake
48+ meson
49+ ninja
3650 makeWrapper
3751 pkg-config
52+ python3
3853 ];
3954
40− cmakeFlags = [ "-Dplatforms=x11,wayland" ];
41−
4255 postInstall = ''
4356 wrapProgram $out/bin/wflinfo \
4457 --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libGL libglvnd ]}