Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libsoup_2_4: Rename from libsoup #360908

Merged
merged 10 commits into from
Dec 7, 2024
Merged

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Dec 1, 2024

The 2.4 ABI branch has not been supported by upstream for a while now but people still keep accidentally adding it to new packages.

See #360897

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: haskell 8.has: documentation This PR adds or changes documentation 6.topic: xfce The Xfce Desktop Environment 6.topic: pantheon The Pantheon desktop environment 6.topic: mate The MATE Desktop Environment 6.topic: games labels Dec 2, 2024
Copy link
Member

@maralorn maralorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr touches hackage-packages.nix

@jtojnar
Copy link
Member Author

jtojnar commented Dec 2, 2024

This pr touches hackage-packages.nix

Not much we can do about that if we do not want to break eval without aliases. Well, we could place the alias to all-packages.nix instead, modify cabal2nix to use the new name, and then move it to aliases.nix but that sounds like to much bother.

@maralorn
Copy link
Member

maralorn commented Dec 3, 2024

Well, we have to do something about it. I see two options: Either add overrides for these packages in configuration-nix.nix or in cabal2nix. I assume @sternenseemann has an opinion on what’s right here.

I mean in theory we don’t even know if the Haskell packages build with the newer libsoup.

@jtojnar
Copy link
Member Author

jtojnar commented Dec 3, 2024

It is not a new version, only the attribute name changed.

@sternenseemann
Copy link
Member

We should probably do the same as we did with the attribute name rename of webkitgtk:

  • Change cabal2nix to emit versioned attributes where the ABI version is statically known, but otherwise emit a dependency on a generic libsoup attribute (may it exist in nixpkgs or not). C.f. Name: use explicit ABI version of webkitgtk cabal2nix#629.
  • In the cases where no versioned attribute was generated, manually add overrides to configuration-common.nix: pkg = super.pkg.override { libsoup = pkgs.…; }. (I think with webkitgtk we didn't need to do this because all relevant packages use pkg-config which has the ABI version in the pc module name.)

jtojnar added a commit to jtojnar/cabal2nix that referenced this pull request Dec 4, 2024
`pkgconfig-depends: libsoup-3.0` was being incorrectly resolved to `libsoup` attribute. Additionally, NixOS/nixpkgs#360908 renamed `libsoup` attribute to `libsoup_2_4`.

Let’s use the correct package attribute names for all libsoup pkg-config files. All libsoup dependent Haskell-packages use `pkgconfig-depends` with one of those names:

https://hackage.haskell.org/package/gi-soup-3.0.3/src/gi-soup.cabal
https://hackage.haskell.org/package/gi-soup-2.4.29/src/gi-soup.cabal
https://hackage.haskell.org/package/spike-0.3/src/spike.cabal
@jtojnar
Copy link
Member Author

jtojnar commented Dec 4, 2024

Opened NixOS/cabal2nix#635

Edit: Rebased and added lib.warnOnInstantiate to the alias.

@sternenseemann
Copy link
Member

I've added the cabal2nix-unstable update to 2476dd6, so hackage-packages.nix should be reproducible using the generation script again.

WebKitGTK 4.1 ABI requires libsoup 3.0. It probably only worked because `webkitgtk_4_1` propagates `libsoup_3` and we were lucky that that version got picked up.
WebKitGTK 4.1 ABI requires libsoup 3.0. It probably only worked because `webkitgtk_4_1` propagates `libsoup_3` and we were lucky that that version got picked up.
WebKitGTK 4.1 ABI requires libsoup 3.0. It probably only worked because `webkitgtk_4_1` propagates `libsoup_3` and we were lucky that that version got picked up.
WebKitGTK 4.1 ABI requires libsoup 3.0. It probably only worked because `webkitgtk_4_1` propagates `libsoup_3` and we were lucky that that version got picked up.
libsoup 2.4 is actually not using this library, only libsoup_3 is.
No-one should be using gnome2 nowadays.
@github-actions github-actions bot removed the 8.has: documentation This PR adds or changes documentation label Dec 4, 2024
sternenseemann and others added 2 commits December 4, 2024 22:46
This emits versioned libsoup_* attributes in hackage-packages.nix and
(unrelatedly) adds support for opencascade-*, thus closes NixOS#359831.
The 2.4 ABI branch has not been supported by upstream for a while now but people still keep accidentally adding it to new packages.
@ofborg ofborg bot added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Dec 5, 2024
@jtojnar jtojnar merged commit 064ee2c into NixOS:master Dec 7, 2024
35 of 37 checks passed
@jtojnar jtojnar deleted the libsoup24-rename branch December 7, 2024 23:37
@zowoq
Copy link
Contributor

zowoq commented Dec 19, 2024

The libsoup -> libsoup_2_4 rename breaks the updateScript which then breaks the updateScript fetcher for the nixpkgs-update bot.

$ nix-shell maintainers/scripts/update.nix --argstr path libsoup_2_4
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'nixpkgs-update-script'
         whose name attribute is located at /home/zowoq/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'shellHook' of derivation 'nixpkgs-update-script'
         at /home/zowoq/nixpkgs/maintainers/scripts/update.nix:261:3:
          260|   '';
          261|   shellHook = ''
             |   ^
          262|     unset shellHook # do not contaminate nested shells

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Cannot find attribute ‘libsoup’.

The 2.4 ABI branch has not been supported by upstream for a while now

Can we remove the updateScript from libsoup_2_4?

@bobby285271
Copy link
Member

#366676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants