diff options
Diffstat (limited to 'pkgs/development/tools')
6 files changed, 46 insertions, 62 deletions
diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix index b5abff94c79..8e2db5caab1 100644 --- a/pkgs/development/tools/analysis/valgrind/default.nix +++ b/pkgs/development/tools/analysis/valgrind/default.nix @@ -16,6 +16,9 @@ stdenv.mkDerivation rec { # Perl is needed for `callgrind_{annotate,control}'. buildInputs = [ gdb perl ] ++ stdenv.lib.optionals (stdenv.isDarwin) [ bootstrap_cmds xnu ]; + # Perl is also a native build input. + nativeBuildInputs = [ perl ]; + enableParallelBuilding = true; separateDebugInfo = stdenv.isLinux; diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 3cd724b1a31..37a44f15e9c 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pkgconfig +{ stdenv, lib, fetchurl, fetchpatch, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash , buildPackages # darwin attributes @@ -36,6 +36,13 @@ stdenv.mkDerivation rec { # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d ./libuv-application-services.patch + + # Fix for harfbuzz with pango versions > 1.43. + # Should be removed with cmake >= 3.16 + (fetchpatch { + url = "https://gitlab.kitware.com/cmake/cmake/commit/effafca77eacbb4988006b1f3f4d9154df6c33f8.diff"; + sha256 = "0vxam5kka1dffygp1nd0g21ib9qk8kds8iprbfga2gimzyrlfmfr"; + }) ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch; outputs = [ "out" ]; diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 6633d101ce4..49d7287087f 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -19,11 +19,11 @@ let in python3Packages.buildPythonApplication rec { pname = "meson"; - version = "0.51.2"; + version = "0.52.1"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "0cqhkjbab1mbvxmbjvyfrbjfkm7bh436svqpjapca36c2k9h1vwr"; + sha256 = "02fnrk1fjf3yiix0ak0m9vgbpl4h97fafii5pmw7phmvnlv9fyan"; }; postFixup = '' @@ -69,23 +69,6 @@ python3Packages.buildPythonApplication rec { url = "https://github.com/mesonbuild/meson/commit/972ede1d14fdf17fe5bb8fb99be220f9395c2392.patch"; sha256 = "19bfsylhpy0b2xv3ks8ac9x3q6vvvyj1wjcy971v9d5f1455xhbb"; }) - ] ++ lib.optionals stdenv.isDarwin [ - # We use custom Clang, which makes Meson think *not Apple*, while still - # relying on system linker. When it detects standard Clang, Meson will - # pass it `-Wl,-O1` flag but optimizations are not recognized by - # Mac linker. - # https://github.com/mesonbuild/meson/issues/4784 - # Should be fixed in 0.52 - ./fix-objc-linking.patch - - # Fixes error finding some frameworks - # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553704175 - # https://github.com/mesonbuild/meson/pull/5980 - # Should be fixed in 0.52 - (fetchpatch { - url = "https://github.com/mesonbuild/meson/commit/8d3fcb3dc4d7204a4646807f8b5191d79fb291e5.patch"; - sha256 = "0g95gl662mribnnz5jcyn1jaaw8w7r1vgbg2jbm91dcrr5zji5ng"; - }) ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch b/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch deleted file mode 100644 index 996e0c3420e..00000000000 --- a/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py -index dc8f099b..d8581fcf 100644 ---- a/mesonbuild/environment.py -+++ b/mesonbuild/environment.py -@@ -944,7 +944,7 @@ - compiler_type = self.get_gnu_compiler_type(defines) - version = self.get_gnu_version_from_defines(defines) - return GnuObjCCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines) -- if out.startswith('Apple LLVM') or out.startswith('Apple clang'): -+ if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin(): - return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap) - if 'windows' in out: - return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap) -@@ -974,7 +974,7 @@ - compiler_type = self.get_gnu_compiler_type(defines) - version = self.get_gnu_version_from_defines(defines) - return GnuObjCPPCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines) -- if out.startswith('Apple LLVM') or out.startswith('Apple clang'): -+ if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin(): - return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap) - if 'windows' in out: - return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap) diff --git a/pkgs/development/tools/build-managers/meson/fix-rpath.patch b/pkgs/development/tools/build-managers/meson/fix-rpath.patch index 1a5f8cb89dc..6cf7afc2bdf 100644 --- a/pkgs/development/tools/build-managers/meson/fix-rpath.patch +++ b/pkgs/development/tools/build-managers/meson/fix-rpath.patch @@ -1,21 +1,34 @@ ---- a/mesonbuild/compilers/compilers.py -+++ b/mesonbuild/compilers/compilers.py -@@ -1202,8 +1202,10 @@ - # In order to avoid relinking for RPATH removal, the binary needs to contain just - # enough space in the ELF header to hold the final installation RPATH. - paths = ':'.join(all_paths) -- if len(paths) < len(install_rpath): -- padding = 'X' * (len(install_rpath) - len(paths)) -+ store_paths = ':'.join(filter(lambda path: path.startswith('@storeDir@'), all_paths)) -+ extra_space_needed = len(install_rpath + (':' if install_rpath and store_paths else '') + store_paths) - len(paths) -+ if extra_space_needed > 0: -+ padding = 'X' * extra_space_needed - if not paths: - paths = padding - else: +--- a/mesonbuild/linkers.py ++++ b/mesonbuild/linkers.py +@@ -527,8 +527,10 @@ class GnuLikeDynamicLinkerMixin: + # In order to avoid relinking for RPATH removal, the binary needs to contain just + # enough space in the ELF header to hold the final installation RPATH. + paths = ':'.join(all_paths) +- if len(paths) < len(install_rpath): +- padding = 'X' * (len(install_rpath) - len(paths)) ++ store_paths = ':'.join(filter(lambda path: path.startswith('@storeDir@'), all_paths)) ++ extra_space_needed = len(install_rpath + (':' if install_rpath and store_paths else '') + store_paths) - len(paths) ++ if extra_space_needed > 0: ++ padding = 'X' * extra_space_needed + if not paths: + paths = padding + else: +@@ -902,8 +904,10 @@ class SolarisDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): + # In order to avoid relinking for RPATH removal, the binary needs to contain just + # enough space in the ELF header to hold the final installation RPATH. + paths = ':'.join(all_paths) +- if len(paths) < len(install_rpath): +- padding = 'X' * (len(install_rpath) - len(paths)) ++ store_paths = ':'.join(filter(lambda path: path.startswith('@storeDir@'), all_paths)) ++ extra_space_needed = len(install_rpath + (':' if install_rpath and store_paths else '') + store_paths) - len(paths) ++ if extra_space_needed > 0: ++ padding = 'X' * extra_space_needed + if not paths: + paths = padding + else: --- a/mesonbuild/scripts/depfixer.py +++ b/mesonbuild/scripts/depfixer.py -@@ -303,6 +303,14 @@ +@@ -303,6 +303,14 @@ class Elf(DataSizes): return self.bf.seek(rp_off) old_rpath = self.read_str() @@ -30,7 +43,7 @@ if len(old_rpath) < len(new_rpath): sys.exit("New rpath must not be longer than the old one.") # The linker does read-only string deduplication. If there is a -@@ -316,6 +324,10 @@ +@@ -316,6 +324,10 @@ class Elf(DataSizes): if not new_rpath: self.remove_rpath_entry(entrynum) else: diff --git a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch b/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch index 7a33d4127fa..e59795486aa 100644 --- a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch +++ b/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch @@ -1,8 +1,8 @@ --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py -@@ -805,6 +805,13 @@ - scan_command += self._scan_langs(state, [lc[0] for lc in langs_compilers]) - scan_command += list(external_ldflags) +@@ -801,6 +801,13 @@ class GnomeModule(ExtensionModule): + scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_source_dir(), self.interpreter.subproject_dir, state.subproject)] + scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), self.interpreter.subproject_dir, state.subproject)] + if len(set([girtarget.get_custom_install_dir()[0] for girtarget in girtargets])) > 1: + raise MesonException('generate_gir tries to build multiple libraries with different install_dir at once: {}'.format(','.join([str(girtarget) for girtarget in girtargets]))) |