From 0ccf369ca9c73fae1cf24f315946c1d78dd5add4 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 22 Oct 2024 22:33:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?webkitgtk:=202.46.1=20=E2=86=92=202.46.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/WebKit/WebKit/compare/webkitgtk-2.46.1...webkitgtk-2.46.2 https://webkitgtk.org/2024/10/21/webkitgtk2.46.2-released.html --- pkgs/development/libraries/webkitgtk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index e4c6afce8a61..b0adcfbaea04 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "webkitgtk"; - version = "2.46.1"; + version = "2.46.2"; name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "6.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}"; outputs = [ "out" "dev" "devdoc" ]; @@ -89,7 +89,7 @@ stdenv.mkDerivation (finalAttrs: { src = fetchurl { url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz"; - hash = "sha256-KhT6rDWa/5QdC8REPrVTfjcCvK8xawoSng5l8/+OqsA="; + hash = "sha256-Wq4cXAow1enFgxZStvG978MddeCtgctAGFsK7ZLOebY="; }; patches = lib.optionals stdenv.hostPlatform.isLinux [ From 3cbe78a60a938a0129767f00b4b2f510e42979bb Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Tue, 22 Oct 2024 22:21:19 +0800 Subject: [PATCH 2/2] webkitgtk: Build with clang The recommendation comes from upstream Skia. --- .../libraries/webkitgtk/default.nix | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/webkitgtk/default.nix b/pkgs/development/libraries/webkitgtk/default.nix index b0adcfbaea04..4636921d60e1 100644 --- a/pkgs/development/libraries/webkitgtk/default.nix +++ b/pkgs/development/libraries/webkitgtk/default.nix @@ -1,5 +1,5 @@ { lib -, stdenv +, clangStdenv , buildPackages , runCommand , fetchurl @@ -72,11 +72,12 @@ , enableGeoLocation ? true , enableExperimental ? false , withLibsecret ? true -, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd +, systemdSupport ? lib.meta.availableOn clangStdenv.hostPlatform systemd , testers }: -stdenv.mkDerivation (finalAttrs: { +# https://webkitgtk.org/2024/10/04/webkitgtk-2.46.html recommends building with clang. +clangStdenv.mkDerivation (finalAttrs: { pname = "webkitgtk"; version = "2.46.2"; name = "${finalAttrs.pname}-${finalAttrs.version}+abi=${if lib.versionAtLeast gtk3.version "4.0" then "6.0" else "4.${if lib.versions.major libsoup.version == "2" then "0" else "1"}"}"; @@ -85,14 +86,14 @@ stdenv.mkDerivation (finalAttrs: { # https://github.com/NixOS/nixpkgs/issues/153528 # Can't be linked within a 4GB address space. - separateDebugInfo = stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.is32bit; + separateDebugInfo = clangStdenv.hostPlatform.isLinux && !clangStdenv.hostPlatform.is32bit; src = fetchurl { url = "https://webkitgtk.org/releases/webkitgtk-${finalAttrs.version}.tar.xz"; hash = "sha256-Wq4cXAow1enFgxZStvG978MddeCtgctAGFsK7ZLOebY="; }; - patches = lib.optionals stdenv.hostPlatform.isLinux [ + patches = lib.optionals clangStdenv.hostPlatform.isLinux [ (substituteAll { src = ./fix-bubblewrap-paths.patch; inherit (builtins) storeDir; @@ -100,7 +101,7 @@ stdenv.mkDerivation (finalAttrs: { }) ]; - preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + preConfigure = lib.optionalString (clangStdenv.hostPlatform != clangStdenv.buildPlatform) '' # Ignore gettext in cmake_prefix_path so that find_program doesn't # pick up the wrong gettext. TODO: Find a better solution for # this, maybe make cmake not look up executables in @@ -123,7 +124,7 @@ stdenv.mkDerivation (finalAttrs: { gi-docgen glib # for gdbus-codegen unifdef - ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + ] ++ lib.optionals clangStdenv.hostPlatform.isLinux [ wayland-scanner ]; @@ -159,14 +160,14 @@ stdenv.mkDerivation (finalAttrs: { p11-kit sqlite woff2 - ] ++ lib.optionals stdenv.hostPlatform.isBigEndian [ + ] ++ lib.optionals clangStdenv.hostPlatform.isBigEndian [ # https://bugs.webkit.org/show_bug.cgi?id=274032 fontconfig freetype - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + ] ++ lib.optionals clangStdenv.hostPlatform.isDarwin [ libedit readline - ] ++ lib.optional (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0") ( + ] ++ lib.optional (clangStdenv.hostPlatform.isDarwin && lib.versionOlder clangStdenv.hostPlatform.darwinSdkVersion "11.0") ( # this can likely be removed as: # "libproc.h is included in the 10.12 SDK Libsystem and should be identical to this one." # but the package is marked broken on darwin so unable to test @@ -178,7 +179,7 @@ stdenv.mkDerivation (finalAttrs: { runCommand "webkitgtk_headers" { } '' install -Dm444 "${lib.getDev apple_sdk.sdk}"/include/libproc.h "$out"/include/libproc.h '' - ) ++ lib.optionals stdenv.hostPlatform.isLinux [ + ) ++ lib.optionals clangStdenv.hostPlatform.isLinux [ libseccomp libmanette wayland @@ -211,12 +212,12 @@ stdenv.mkDerivation (finalAttrs: { "-DUSE_SOUP2=${cmakeBool (lib.versions.major libsoup.version == "2")}" "-DUSE_LIBSECRET=${cmakeBool withLibsecret}" "-DENABLE_EXPERIMENTAL_FEATURES=${cmakeBool enableExperimental}" - ] ++ lib.optionals stdenv.hostPlatform.isLinux [ + ] ++ lib.optionals clangStdenv.hostPlatform.isLinux [ # Have to be explicitly specified when cross. # https://github.com/WebKit/WebKit/commit/a84036c6d1d66d723f217a4c29eee76f2039a353 "-DBWRAP_EXECUTABLE=${lib.getExe bubblewrap}" "-DDBUS_PROXY_EXECUTABLE=${lib.getExe xdg-dbus-proxy}" - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + ] ++ lib.optionals clangStdenv.hostPlatform.isDarwin [ "-DENABLE_GAMEPAD=OFF" "-DENABLE_GTKDOC=OFF" "-DENABLE_MINIBROWSER=OFF" @@ -255,6 +256,6 @@ stdenv.mkDerivation (finalAttrs: { ]; platforms = platforms.linux ++ platforms.darwin; maintainers = teams.gnome.members; - broken = stdenv.hostPlatform.isDarwin; + broken = clangStdenv.hostPlatform.isDarwin; }; })