26 stdenv.mkDerivation (finalAttrs: {
30 src = fetchFromGitHub {
33 rev = "v${finalAttrs.version}";
34 hash = "sha256-E2XKnvARq45AjAc0iBVyb2ssNyJOUye4MWOofZV2ahs=";
37 patches = [ ./disable-tests-that-require-network-access.patch ];
55 ++ lib.optionals stdenv.hostPlatform.isDarwin [
59 ++ lib.optionals stdenv.hostPlatform.isLinux [ libuuid ];
61 mesonFlags = [ "-Dbenchmarks=false" ];
63 mesonCheckFlags = [ "--print-errorlogs" ];
69 ada = fetchFromGitHub {
73 hash = "sha256-V5LwL03x7/a9Lvg1gPvgGipo7IICU7xyO2D3GqP6Lbw=";
76 muon = fetchFromGitHub {
79 rev = "62af239567ec3b086bae7f02d4aed3a545949155";
80 hash = "sha256-k883mKwuP35f0WtwX8ybl9uYbvA3y6Vxtv2EJMpZDEs=";
83 sha256 = fetchFromGitHub {
86 rev = "49265c656f9b370da660531db8cc6bf0a2e110a6";
87 hash = "sha256-X9M/ZATYXUiE4oGorPBnsdaKnKaObarnMRh6QEfkBls=";
90 tomlplusplus = fetchFromGitHub {
92 repo = "tomlplusplus";
94 hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
97 tree-sitter = fetchFromGitHub {
98 owner = "tree-sitter";
101 hash = "sha256-278zU5CLNOwphGBUa4cGwjBqRJ87dhHMzFirZB09gYM=";
104 tree-sitter-ini = fetchFromGitHub {
106 repo = "tree-sitter-ini";
107 rev = "20aa563306e9406ac55babb4474521060df90a30";
108 hash = "sha256-1hHjtghBIf7lOPpupT1pUCZQCnzUi4Qt/yHSCdjMhCU=";
111 tree-sitter-meson = fetchFromGitHub {
113 repo = "tree-sitter-meson";
114 rev = "09665faff74548820c10d77dd8738cd76d488572";
115 hash = "sha256-ice2NdK1/U3NylIQDnNCN41rK/G6uqFOX+OeNf3zm18=";
120 cd "$sourceRoot/subprojects"
122 cp -R --no-preserve=mode,ownership ${ada} ada
123 cp "packagefiles/ada/meson.build" ada
125 cp -R --no-preserve=mode,ownership ${muon} muon
127 cp -R --no-preserve=mode,ownership ${sha256} sha256
128 cp "packagefiles/sha256/meson.build" sha256
130 cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus-3.4.0
132 cp -R --no-preserve=mode,ownership ${tree-sitter} tree-sitter-0.20.8
133 cp "packagefiles/tree-sitter-0.20.8/meson.build" tree-sitter-0.20.8
135 cp -R --no-preserve=mode,ownership ${tree-sitter-ini} tree-sitter-ini
136 cp "packagefiles/tree-sitter-ini/meson.build" tree-sitter-ini
138 cp -R --no-preserve=mode,ownership ${tree-sitter-meson} tree-sitter-meson
139 cp "packagefiles/tree-sitter-meson/meson.build" tree-sitter-meson
144 substituteInPlace subprojects/muon/include/compilers.h \
145 --replace-fail 'compiler_language new' 'compiler_language new_'
147 patchShebangs src/libtypenamespace
151 updateScript = nix-update-script { };
152 tests.version = testers.testVersion {
154 version = "v${finalAttrs.version}";
159 description = "An unofficial, unendorsed language server for Meson written in C++";
160 homepage = "https://github.com/JCWasmx86/mesonlsp";
161 changelog = "https://github.com/JCWasmx86/mesonlsp/releases/tag/v${finalAttrs.version}";
162 license = licenses.gpl3Plus;
163 mainProgram = "mesonlsp";
164 maintainers = with maintainers; [ paveloom ];
165 platforms = platforms.unix;