Skip to content

Commit f32c64b

Browse files
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 (NixOS/nixpkgs#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 <[email protected]>
1 parent 6fe4181 commit f32c64b

File tree

1 file changed

+11
-4
lines changed
  • cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal

1 file changed

+11
-4
lines changed

cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/Name.hs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@ libNixName "ImageMagick" = return "imagemagick"
9999
libNixName "Imlib2" = return "imlib2"
100100
libNixName "iw" = return "wirelesstools"
101101
libNixName "jack" = return "libjack2"
102-
libNixName "javascriptcoregtk-4.0" = return "webkitgtk"
102+
libNixName "javascriptcoregtk" = return "webkitgtk"
103+
libNixName "javascriptcoregtk-4.0" = return "webkitgtk_4_0"
104+
libNixName "javascriptcoregtk-4.1" = return "webkitgtk_4_1"
105+
libNixName "javascriptcoregtk-6.0" = return "webkitgtk_6_0"
103106
libNixName "jpeg" = return "libjpeg"
104107
libNixName "jvm" = return "jdk"
105108
libNixName "lapack" = return "liblapack"
@@ -185,10 +188,14 @@ libNixName "wayland-client" = return "wayland"
185188
libNixName "wayland-cursor" = return "wayland"
186189
libNixName "wayland-egl" = return "libGL"
187190
libNixName "wayland-server" = return "wayland"
188-
libNixName "webkit" = return "webkitgtk"
191+
libNixName "webkit" = return "webkitgtk" -- this is an alias, so it only works for downstream expressions not in hackage-packages.nix
189192
libNixName "webkit2gtk" = return "webkitgtk"
190-
libNixName "webkit2gtk-4.0" = return "webkitgtk"
191-
libNixName "webkit2gtk-web-extension-4.0" = return "webkitgtk"
193+
libNixName "webkit2gtk-4.0" = return "webkitgtk_4_0"
194+
libNixName "webkit2gtk-4.1" = return "webkitgtk_4_1"
195+
libNixName "webkit2gtk-6.0" = return "webkitgtk_6_0"
196+
libNixName "webkit2gtk-web-extension-4.0" = return "webkitgtk_4_0"
197+
libNixName "webkit2gtk-web-extension-4.1" = return "webkitgtk_4_1"
198+
libNixName "webkit2gtk-web-extension-6.0" = return "webkitgtk_6_0"
192199
libNixName "wxGTK" = return "wxGTK32"
193200
libNixName "X11" = return "libX11"
194201
libNixName "x11" = return "libX11"

0 commit comments

Comments
 (0)