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

stduuid: fix cmake version #307320

Merged
merged 2 commits into from
Apr 29, 2024
Merged

Conversation

OlivierLDff
Copy link
Contributor

@OlivierLDff OlivierLDff commented Apr 27, 2024

stduuid reported the wrong version to cmake, causing
find_package(stduuid 1.2.3) to fail (but find_package(stduuid 1.0) was working which is NOT expected).
Patch is from this PR.

This will need to be updated if stduuid is getting maintained again one day.

$ cat /nix/store/srxjm722bl6n012q0s2xx4w7scwbrv7j-stduuid-1.2.3/lib/cmake/stduuid/stduuid-config-version.cmake
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().

set(PACKAGE_VERSION "1.2.3")

Before it was set(PACKAGE_VERSION "1.0")

Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

Migrate this expression to by-name hierarchy:

  1. Move this default.nix file to pkgs/by-name/st/stduuid/package.nix;
  2. Remove the line stduuid = callPackage ../development/libraries/stduuid { }; from pkgs/top-level/all-packages.nix.
  3. Make a new commit with the two changes above (no need for a new PR).

pkgs/development/libraries/stduuid/default.nix Outdated Show resolved Hide resolved
stduuid reported the wrong version to cmake, causing
`find_package(stduuid 1.2.3)` to fail (but `find_package(stduuid 1.0)`
was working which is NOT expected.
Patch is from this
[PR](mariusbancila/stduuid#79).

This will need to be updated if `stduuid` is getting maintained again
one day.
Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

LGTM

@OlivierLDff
Copy link
Contributor Author

Migration to by-name done. Thanks for the review and the time spend guided a newcomer.

@shlevy shlevy merged commit 1383c90 into NixOS:master Apr 29, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants