28 stdenv' = if stdenv.hostPlatform.isDarwin then llvmPackages_19.stdenv else stdenv;
30 stdenv'.mkDerivation (finalAttrs: {
34 src = fetchFromGitHub {
37 rev = "v${finalAttrs.version}";
38 hash = "sha256-QhZv4PTcf1jzSOcp1+bPZWf5COugCIMq1zkhc0PJjUQ=";
41 patches = [ ./disable-tests-that-require-network-access.patch ];
59 ++ lib.optionals stdenv.hostPlatform.isDarwin [
63 ++ lib.optionals stdenv.hostPlatform.isLinux [ libuuid ];
65 mesonFlags = [ "-Dbenchmarks=false" ];
67 mesonCheckFlags = [ "--print-errorlogs" ];
73 ada = fetchFromGitHub {
77 hash = "sha256-V5LwL03x7/a9Lvg1gPvgGipo7IICU7xyO2D3GqP6Lbw=";
80 muon = fetchFromGitHub {
83 rev = "62af239567ec3b086bae7f02d4aed3a545949155";
84 hash = "sha256-k883mKwuP35f0WtwX8ybl9uYbvA3y6Vxtv2EJMpZDEs=";
87 sha256 = fetchFromGitHub {
90 rev = "49265c656f9b370da660531db8cc6bf0a2e110a6";
91 hash = "sha256-X9M/ZATYXUiE4oGorPBnsdaKnKaObarnMRh6QEfkBls=";
94 tomlplusplus = fetchFromGitHub {
96 repo = "tomlplusplus";
98 hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
101 tree-sitter = fetchFromGitHub {
102 owner = "tree-sitter";
103 repo = "tree-sitter";
105 hash = "sha256-278zU5CLNOwphGBUa4cGwjBqRJ87dhHMzFirZB09gYM=";
108 tree-sitter-ini = fetchFromGitHub {
110 repo = "tree-sitter-ini";
111 rev = "20aa563306e9406ac55babb4474521060df90a30";
112 hash = "sha256-1hHjtghBIf7lOPpupT1pUCZQCnzUi4Qt/yHSCdjMhCU=";
115 tree-sitter-meson = fetchFromGitHub {
117 repo = "tree-sitter-meson";
118 rev = "09665faff74548820c10d77dd8738cd76d488572";
119 hash = "sha256-ice2NdK1/U3NylIQDnNCN41rK/G6uqFOX+OeNf3zm18=";
124 cd "$sourceRoot/subprojects"
126 cp -R --no-preserve=mode,ownership ${ada} ada
127 cp "packagefiles/ada/meson.build" ada
129 cp -R --no-preserve=mode,ownership ${muon} muon
131 cp -R --no-preserve=mode,ownership ${sha256} sha256
132 cp "packagefiles/sha256/meson.build" sha256
134 cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus-3.4.0
136 cp -R --no-preserve=mode,ownership ${tree-sitter} tree-sitter-0.20.8
137 cp "packagefiles/tree-sitter-0.20.8/meson.build" tree-sitter-0.20.8
139 cp -R --no-preserve=mode,ownership ${tree-sitter-ini} tree-sitter-ini
140 cp "packagefiles/tree-sitter-ini/meson.build" tree-sitter-ini
142 cp -R --no-preserve=mode,ownership ${tree-sitter-meson} tree-sitter-meson
143 cp "packagefiles/tree-sitter-meson/meson.build" tree-sitter-meson
148 substituteInPlace subprojects/muon/include/compilers.h \
149 --replace-fail 'compiler_language new' 'compiler_language new_'
151 patchShebangs src/libtypenamespace
155 updateScript = nix-update-script { };
156 tests.version = testers.testVersion {
158 version = "v${finalAttrs.version}";
163 description = "An unofficial, unendorsed language server for Meson written in C++";
164 homepage = "https://github.com/JCWasmx86/mesonlsp";
165 changelog = "https://github.com/JCWasmx86/mesonlsp/releases/tag/v${finalAttrs.version}";
166 license = licenses.gpl3Plus;
167 mainProgram = "mesonlsp";
168 maintainers = with maintainers; [ paveloom ];
169 platforms = platforms.unix;
170 # ../src/liblog/log.cpp:41:7: error: call to 'format' is ambiguous
171 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;