Skip to content

Commit accd401

Browse files
author
Jasi
committed
virglrenderer: refactor
1 parent 4802cae commit accd401

1 file changed

Lines changed: 27 additions & 20 deletions

File tree

pkgs/by-name/vi/virglrenderer/package.nix

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
libX11,
1212
libdrm,
1313
libgbm,
14-
nativeContextSupport ? stdenv.hostPlatform.isLinux,
15-
vaapiSupport ? !stdenv.hostPlatform.isDarwin,
1614
libva,
17-
vulkanSupport ? stdenv.hostPlatform.isLinux,
1815
vulkan-headers,
1916
vulkan-loader,
2017
nix-update-script,
18+
vulkanSupport ? stdenv.hostPlatform.isLinux,
19+
nativeContextSupport ? stdenv.hostPlatform.isLinux,
20+
vaapiSupport ? !stdenv.hostPlatform.isDarwin,
2121
}:
2222

2323
stdenv.mkDerivation (finalAttrs: {
@@ -34,36 +34,43 @@ stdenv.mkDerivation (finalAttrs: {
3434

3535
separateDebugInfo = true;
3636

37+
nativeBuildInputs = [
38+
meson
39+
ninja
40+
pkg-config
41+
(buildPackages.python3.withPackages (ps: [
42+
ps.pyyaml
43+
]))
44+
];
45+
3746
buildInputs = [
3847
libepoxy
3948
]
40-
++ lib.optionals vaapiSupport [ libva ]
41-
++ lib.optionals vulkanSupport [
42-
vulkan-headers
43-
vulkan-loader
44-
]
4549
++ lib.optionals stdenv.hostPlatform.isLinux [
4650
libGLU
4751
libX11
4852
libdrm
4953
libgbm
50-
];
51-
52-
nativeBuildInputs = [
53-
meson
54-
ninja
55-
pkg-config
56-
(buildPackages.python3.withPackages (ps: [
57-
ps.pyyaml
58-
]))
54+
]
55+
++ lib.optionals vaapiSupport [
56+
libva
57+
]
58+
++ lib.optionals vulkanSupport [
59+
vulkan-headers
60+
vulkan-loader
5961
];
6062

6163
mesonFlags = [
6264
(lib.mesonBool "video" vaapiSupport)
6365
(lib.mesonBool "venus" vulkanSupport)
64-
]
65-
++ lib.optionals nativeContextSupport [
66-
(lib.mesonOption "drm-renderers" "amdgpu-experimental,msm")
66+
(lib.mesonOption "drm-renderers" (
67+
lib.optionalString nativeContextSupport (
68+
lib.concatStringsSep "," [
69+
"amdgpu-experimental"
70+
"msm"
71+
]
72+
)
73+
))
6774
];
6875

6976
passthru = {

0 commit comments

Comments
 (0)