Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1# The Darwin build of Mesa is different enough that we just give it an entire separate expression.
2{
3 lib,
4 stdenv,
5 fetchFromGitLab,
6 bison,
7 flex,
8 libxml2,
9 llvmPackages,
10 meson,
11 ninja,
12 pkg-config,
13 python3Packages,
14 xorg,
15 zlib,
16}:
17let
18 common = import ./common.nix { inherit lib fetchFromGitLab; };
19in
20stdenv.mkDerivation {
21 inherit (common)
22 pname
23 version
24 src
25 meta
26 ;
27
28 outputs = [
29 "out"
30 "dev"
31 ];
32
33 nativeBuildInputs = [
34 bison
35 flex
36 meson
37 ninja
38 pkg-config
39 python3Packages.packaging
40 python3Packages.python
41 python3Packages.mako
42 python3Packages.pyyaml
43 ];
44
45 buildInputs = [
46 libxml2 # should be propagated from libllvm
47 llvmPackages.libllvm
48 xorg.libX11
49 xorg.libXext
50 xorg.libXfixes
51 zlib
52 ];
53
54 mesonAutoFeatures = "disabled";
55
56 mesonFlags = [
57 "--sysconfdir=/etc"
58 "--datadir=${placeholder "out"}/share"
59 (lib.mesonEnable "glvnd" false)
60 (lib.mesonEnable "shared-glapi" true)
61 (lib.mesonEnable "llvm" true)
62 ];
63
64 passthru = {
65 # needed to pass evaluation of bad platforms
66 driverLink = throw "driverLink not supported on darwin";
67 # Don't need this on Darwin.
68 llvmpipeHook = null;
69 };
70
71}