From bb478d3c5f97cc9f4b8f6bd75345227c014b134e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Sat, 5 Oct 2024 12:19:00 -0600 Subject: [PATCH] FromCabal.Name: add missing (versioned) webkitgtk pkg-config names When we don't know the exact version from the cabal file, we still emit the generic name that has recently been removed from nixpkgs safe for an alias (https://github.com/NixOS/nixpkgs/pull/345611) which we can't use in hackage-packages.nix. This is still the best solution for downstream expressions generated by cabal2nix, in nixpkgs we'll have to manually specify the correct version (instead of hackage2nix picking the default which may not always be correct). Co-authored-by: sternenseemann --- .../Distribution/Nixpkgs/Haskell/FromCabal/Name.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs index 38b6d356..7e881b85 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs @@ -99,7 +99,10 @@ libNixName "ImageMagick" = return "imagemagick" libNixName "Imlib2" = return "imlib2" libNixName "iw" = return "wirelesstools" libNixName "jack" = return "libjack2" +libNixName "javascriptcoregtk" = return "webkitgtk" libNixName "javascriptcoregtk-4.0" = return "webkitgtk_4_0" +libNixName "javascriptcoregtk-4.1" = return "webkitgtk_4_1" +libNixName "javascriptcoregtk-6.0" = return "webkitgtk_6_0" libNixName "jpeg" = return "libjpeg" libNixName "jvm" = return "jdk" libNixName "lapack" = return "liblapack" @@ -185,10 +188,14 @@ libNixName "wayland-client" = return "wayland" libNixName "wayland-cursor" = return "wayland" libNixName "wayland-egl" = return "libGL" libNixName "wayland-server" = return "wayland" -libNixName "webkit" = return "webkitgtk_4_0" -libNixName "webkit2gtk" = return "webkitgtk_4_0" +libNixName "webkit" = return "webkitgtk" -- this is an alias, so it only works for downstream expressions not in hackage-packages.nix +libNixName "webkit2gtk" = return "webkitgtk" libNixName "webkit2gtk-4.0" = return "webkitgtk_4_0" +libNixName "webkit2gtk-4.1" = return "webkitgtk_4_1" +libNixName "webkit2gtk-6.0" = return "webkitgtk_6_0" libNixName "webkit2gtk-web-extension-4.0" = return "webkitgtk_4_0" +libNixName "webkit2gtk-web-extension-4.1" = return "webkitgtk_4_1" +libNixName "webkit2gtk-web-extension-6.0" = return "webkitgtk_6_0" libNixName "wxGTK" = return "wxGTK32" libNixName "X11" = return "libX11" libNixName "x11" = return "libX11"