pkgs: Fix update of mesonlsp

This commit is contained in:
traxys 2024-05-07 14:40:12 +02:00
parent dd0c13270e
commit 02932d842e
3 changed files with 49 additions and 6 deletions

View file

@ -16,5 +16,5 @@
bonnie = callPackage ./bonnie {};
perseus-cli = callPackage ./perseus {inherit bonnie;};
flex-launcher = callPackage ./flex-launcher.nix {};
mesonlsp = callPackage ./mesonlsp.nix {};
mesonlsp = callPackage ./mesonlsp {};
}

View file

@ -0,0 +1,37 @@
diff --git a/meson.build b/meson.build
index ff0f0c3e..82c4fbe8 100644
--- a/meson.build
+++ b/meson.build
@@ -34,7 +34,11 @@ if buildtype != 'plain'
]
if cc.get_id() == 'gcc'
- extra_flags += [
+ extra_c_flags += [
+ '-Wshadow=local',
+ '-fstack-clash-protection',
+ ]
+ extra_cxx_flags += [
'-Wshadow=local',
'-fstack-clash-protection',
]
@@ -44,7 +48,8 @@ if buildtype != 'plain'
extra_flags += [
'-frecord-gcc-switches',
]
- extra_flags += cc.get_supported_arguments('-mshstk', '-fcf-protection=full')
+ extra_c_flags += cc.get_supported_arguments('-mshstk', '-fcf-protection=full')
+ extra_cxx_flags += cxx.get_supported_arguments('-mshstk', '-fcf-protection=full')
endif
global_link_args = host_machine.system() == 'windows' ? [] : ['-rdynamic']
@@ -54,7 +59,8 @@ if buildtype != 'plain'
global_link_args += ['-Wl,-ld_classic']
endif
- add_global_arguments(extra_flags, language: ['c', 'cpp'])
+ add_global_arguments(extra_flags + extra_c_flags, language: ['c'])
+ add_global_arguments(extra_flags + extra_cxx_flags, language: ['cpp'])
add_global_link_arguments(global_link_args, language: ['c', 'cpp'])
endif

View file

@ -12,7 +12,8 @@
libuuid,
libpkgconf,
libunwind,
python3
python3,
tomlplusplus,
}: let
ada = fetchFromGitHub {
owner = "ada-url";
@ -54,8 +55,8 @@
muon = fetchFromGitHub {
owner = "JCWasmx86";
repo = "muon";
rev = "e7d0aae70c695a1adec81b9a05429474ee5c1bc1";
hash = "sha256-dsvxqSr+Hl5GKYj55MU0o4lHzgPbykuf6sQ/9h+bBPQ=";
rev = "62af239";
hash = "sha256-k883mKwuP35f0WtwX8ybl9uYbvA3y6Vxtv2EJMpZDEs=";
};
in
stdenv.mkDerivation rec {
@ -65,8 +66,8 @@ in
src = fetchFromGitHub {
owner = "JCWasmx86";
repo = "mesonlsp";
rev = "fb28856";
hash = "sha256-dHtKSQ+/oq5NzqIhXJ7luVBQ2V7Ec6ikLwlYMzaem80=";
rev = "refs/tags/v${version}";
hash = "sha256-pN8MCqrRfVpmM8KWa7HPTghoegplM4bP/HRVJVs05iE=";
};
postUnpack = ''
@ -82,6 +83,10 @@ in
mesonFlags = ["-Dbenchmarks=false"];
patches = [
./build_flags.patch
];
postPatch = ''
patchShebangs .
pushd subprojects
@ -101,6 +106,7 @@ in
];
buildInputs = [
tomlplusplus
nlohmann_json
curl
libarchive