Skip to content

SDL_compat: symlink package config specification file into sdl.pc#388304

Merged
K900 merged 1 commit intoNixOS:masterfrom
LordGrimmauld:sdl_compat_prep
Mar 9, 2025
Merged

SDL_compat: symlink package config specification file into sdl.pc#388304
K900 merged 1 commit intoNixOS:masterfrom
LordGrimmauld:sdl_compat_prep

Conversation

@LordGrimmauld
Copy link
Contributor

@LordGrimmauld LordGrimmauld commented Mar 8, 2025

Previously, replacing SDL with SDL_compat with dependents on the SDL pkgconfig file would just break.
An example for this breakage is pkgs.quirc.override { SDL = pkgs.SDL_compat; }. This PR aims to fix this by symlinking the missing sdl.pc file to point to sdl12_compat.pc instead.

DISCLAIMER: I have no idea how many rebuilds this will cause, this might well be a mass rebuild in which case i'll need to rebase against staging. Opening this PR early partially to track and see rebuild count.

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 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Mar 8, 2025
@nix-owners nix-owners bot requested a review from peterhoeg March 8, 2025 21:49
@SuperSandro2000 SuperSandro2000 changed the title pkgs/SDL_compat: symlink package config specification file into sdl.pc SDL_compat: symlink package config specification file into sdl.pc Mar 8, 2025
@LordGrimmauld
Copy link
Contributor Author

LordGrimmauld commented Mar 8, 2025

running nixpkgs-review currently. This only caused ~25 rebuilds, none of which actually use pkg-config for SDL afaict.
However, applying a similar overlay to my system config, it now builds more than it previously did (globally replacing SDL -> SDL_compat is still broken, but not because of this.)

@LordGrimmauld
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 388304


x86_64-linux

✅ 14 packages built:
  • SDL_compat
  • bottles
  • dosbox
  • katawa-shoujo
  • keen4
  • open-watcom-v2
  • open-watcom-v2-unwrapped
  • openxcom
  • rott
  • rott-shareware
  • zandronum
  • zandronum-alpha
  • zandronum-alpha-server
  • zandronum-server

@LordGrimmauld
Copy link
Contributor Author

I also tested this PR against #384912 switching back to pkg-config and dropping the custom preConfigure phase, works perfectly.

@K900 K900 merged commit d7e7e53 into NixOS:master Mar 9, 2025
23 of 25 checks passed
LordGrimmauld added a commit to LordGrimmauld/nixpkgs that referenced this pull request Mar 26, 2025
Previously, replacing SDL2 with sdl2-compat with dependents on the SDL2 pkgconfig file would just break.
An example for this breakage is pkgs.ffmpeg.override { SDL2 = pkgs.sdl2-compat; }.
This is fixed by symlinking the missing sdl2.pc file to point to sdl2_compat.pc.

This is analogous to NixOS#388304 (aa8bb53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants