Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 libglvnd,
6 bison,
7 flex,
8 meson,
9 pkg-config,
10 ninja,
11 python3Packages,
12 libdrm,
13}:
14
15let
16 common = import ./common.nix { inherit lib fetchFromGitLab; };
17in
18stdenv.mkDerivation rec {
19 pname = "mesa-libgbm";
20
21 # We don't use the versions from common.nix, because libgbm is a world rebuild,
22 # so the updates need to happen separately on staging.
23 version = "25.1.0";
24
25 src = fetchFromGitLab {
26 domain = "gitlab.freedesktop.org";
27 owner = "mesa";
28 repo = "mesa";
29 rev = "mesa-${version}";
30 hash = "sha256-UlI+6OMUj5F6uVAw+Mg2wOZrjfdRq73d1qufaXVI/go";
31 };
32
33 mesonAutoFeatures = "disabled";
34
35 mesonFlags = [
36 "--sysconfdir=/etc"
37
38 (lib.mesonEnable "gbm" true)
39 (lib.mesonOption "gbm-backends-path" "${libglvnd.driverLink}/lib/gbm")
40
41 (lib.mesonEnable "egl" false)
42 (lib.mesonEnable "glx" false)
43 (lib.mesonEnable "zlib" false)
44
45 (lib.mesonOption "platforms" "")
46 (lib.mesonOption "gallium-drivers" "")
47 (lib.mesonOption "vulkan-drivers" "")
48 (lib.mesonOption "vulkan-layers" "")
49 ];
50
51 strictDeps = true;
52
53 propagatedBuildInputs = [ libdrm ];
54
55 nativeBuildInputs = [
56 bison
57 flex
58 meson
59 pkg-config
60 ninja
61 python3Packages.packaging
62 python3Packages.python
63 python3Packages.mako
64 python3Packages.pyyaml
65 ];
66
67 inherit (common) meta;
68}