Skip to content

meson: refactor nix_soversion into nix-meson-build-support/common#14001

Merged
Mic92 merged 1 commit intoNixOS:masterfrom
juhp:common-soversion
Sep 16, 2025
Merged

meson: refactor nix_soversion into nix-meson-build-support/common#14001
Mic92 merged 1 commit intoNixOS:masterfrom
juhp:common-soversion

Conversation

@juhp
Copy link
Copy Markdown
Contributor

@juhp juhp commented Sep 16, 2025

This is a follow-on to #13995 which added nix version soversion to the libraries.

A code cleanup to have a common nix_soversion defined in nix-meson-build-support,
suggested by @xokdvium in #13995 (review)

This is a follow-on to NixOS#13995 which added soversion to the libraries
@github-actions github-actions bot added fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Sep 16, 2025
@juhp juhp marked this pull request as ready for review September 16, 2025 05:53
@juhp
Copy link
Copy Markdown
Contributor Author

juhp commented Sep 16, 2025

(https://koji.fedoraproject.org/koji/taskinfo?taskID=137166744 is a Fedora Rawhide test build)

@Mic92 Mic92 merged commit 1a69fc6 into NixOS:master Sep 16, 2025
16 checks passed
@juhp juhp deleted the common-soversion branch September 16, 2025 08:09
endif

# Darwin ld doesn't like "X.Y.Zpre"
nix_soversion = meson.project_version().strip('pre')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This strips any of p, r, e at the end of the string. In other words, `s/^[pre]+//; s/[pre]+$//'. This will work, though it might be a bit surprising in some contexts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahh - oh thanks for mentioning that - okay I will switch back to .replace() then...
(there used to be .remove_suffix() but no more apparently)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I opened #14005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface fetching Networking with the outside (non-Nix) world, input locking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants