From f32c64be22cd7e505a84e8eb2d9125ffabf24623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Sat, 5 Oct 2024 11:25:39 -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 --- .../Nixpkgs/Haskell/FromCabal/Name.hs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs index a175ecad..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-4.0" = return "webkitgtk" +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" +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" -libNixName "webkit2gtk-web-extension-4.0" = 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"