chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / me / mesonlsp / package.nix
blobe1e0a3b771c13274cbcff1bb580ea57ba26e7582
2   lib,
3   stdenv,
4   fetchFromGitHub,
6   gtest,
7   makeWrapper,
8   meson,
9   ninja,
10   pkg-config,
11   python3,
13   curl,
14   libarchive,
15   libossp_uuid,
16   libpkgconf,
17   libuuid,
18   nlohmann_json,
19   pkgsStatic,
21   mesonlsp,
22   nix-update-script,
23   testers,
26 stdenv.mkDerivation (finalAttrs: {
27   pname = "mesonlsp";
28   version = "4.3.5";
30   src = fetchFromGitHub {
31     owner = "JCWasmx86";
32     repo = "mesonlsp";
33     rev = "v${finalAttrs.version}";
34     hash = "sha256-E2XKnvARq45AjAc0iBVyb2ssNyJOUye4MWOofZV2ahs=";
35   };
37   patches = [ ./disable-tests-that-require-network-access.patch ];
39   nativeBuildInputs = [
40     gtest
41     makeWrapper
42     meson
43     ninja
44     pkg-config
45     python3
46   ];
48   buildInputs =
49     [
50       curl
51       libarchive
52       libpkgconf
53       nlohmann_json
54     ]
55     ++ lib.optionals stdenv.hostPlatform.isDarwin [
56       libossp_uuid
57       pkgsStatic.fmt
58     ]
59     ++ lib.optionals stdenv.hostPlatform.isLinux [ libuuid ];
61   mesonFlags = [ "-Dbenchmarks=false" ];
63   mesonCheckFlags = [ "--print-errorlogs" ];
65   doCheck = true;
67   postUnpack =
68     let
69       ada = fetchFromGitHub {
70         owner = "ada-url";
71         repo = "ada";
72         rev = "v2.7.4";
73         hash = "sha256-V5LwL03x7/a9Lvg1gPvgGipo7IICU7xyO2D3GqP6Lbw=";
74       };
76       muon = fetchFromGitHub {
77         owner = "JCWasmx86";
78         repo = "muon";
79         rev = "62af239567ec3b086bae7f02d4aed3a545949155";
80         hash = "sha256-k883mKwuP35f0WtwX8ybl9uYbvA3y6Vxtv2EJMpZDEs=";
81       };
83       sha256 = fetchFromGitHub {
84         owner = "amosnier";
85         repo = "sha-2";
86         rev = "49265c656f9b370da660531db8cc6bf0a2e110a6";
87         hash = "sha256-X9M/ZATYXUiE4oGorPBnsdaKnKaObarnMRh6QEfkBls=";
88       };
90       tomlplusplus = fetchFromGitHub {
91         owner = "marzer";
92         repo = "tomlplusplus";
93         rev = "v3.4.0";
94         hash = "sha256-h5tbO0Rv2tZezY58yUbyRVpsfRjY3i+5TPkkxr6La8M=";
95       };
97       tree-sitter = fetchFromGitHub {
98         owner = "tree-sitter";
99         repo = "tree-sitter";
100         rev = "v0.20.8";
101         hash = "sha256-278zU5CLNOwphGBUa4cGwjBqRJ87dhHMzFirZB09gYM=";
102       };
104       tree-sitter-ini = fetchFromGitHub {
105         owner = "JCWasmx86";
106         repo = "tree-sitter-ini";
107         rev = "20aa563306e9406ac55babb4474521060df90a30";
108         hash = "sha256-1hHjtghBIf7lOPpupT1pUCZQCnzUi4Qt/yHSCdjMhCU=";
109       };
111       tree-sitter-meson = fetchFromGitHub {
112         owner = "JCWasmx86";
113         repo = "tree-sitter-meson";
114         rev = "09665faff74548820c10d77dd8738cd76d488572";
115         hash = "sha256-ice2NdK1/U3NylIQDnNCN41rK/G6uqFOX+OeNf3zm18=";
116       };
117     in
118     ''
119       (
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
140       )
141     '';
143   postPatch = ''
144     substituteInPlace subprojects/muon/include/compilers.h \
145       --replace-fail 'compiler_language new' 'compiler_language new_'
147     patchShebangs src/libtypenamespace
148   '';
150   passthru = {
151     updateScript = nix-update-script { };
152     tests.version = testers.testVersion {
153       package = mesonlsp;
154       version = "v${finalAttrs.version}";
155     };
156   };
158   meta = with lib; {
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;
166   };