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

rubyPackages.pg: use pkg-config instead of pg_config #237858

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

tie
Copy link
Member

@tie tie commented Jun 15, 2023

Description of changes

This change forces pg native extension to use pkg-config to locate libpq instead of running pg_config. It also removes an unnecessary reference to postgresql package since build flags are embedded in the output at $out/${ruby.gemPath}/build_info/*.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

This change forces pg native extension to use pkg-config to locate libpq
instead of running pg_config. It also removes an unnecessary reference
to postgresql package since build flags are embedded in the output at
`$out/${ruby.gemPath}/build_info/*`.
@tie
Copy link
Member Author

tie commented Jun 15, 2023

Result of nixpkgs-review run on aarch64-linux 1

15 packages built:
  • gitlab
  • gitlab-ee
  • ledger-web
  • mastodon
  • metasploit
  • msfpc
  • pgsync
  • redmine
  • rubyPackages.pg
  • rubyPackages.sequel_pg
  • rubyPackages_3_0.pg
  • rubyPackages_3_0.sequel_pg
  • rubyPackages_3_2.pg
  • rubyPackages_3_2.sequel_pg
  • social-engineer-toolkit

@tie
Copy link
Member Author

tie commented Jun 15, 2023

Result of nixpkgs-review run on x86_64-linux 1

15 packages built:
  • gitlab
  • gitlab-ee
  • ledger-web
  • mastodon
  • metasploit
  • msfpc
  • pgsync
  • redmine
  • rubyPackages.pg
  • rubyPackages.sequel_pg
  • rubyPackages_3_0.pg
  • rubyPackages_3_0.sequel_pg
  • rubyPackages_3_2.pg
  • rubyPackages_3_2.sequel_pg
  • social-engineer-toolkit

@tie tie marked this pull request as ready for review June 15, 2023 04:05
@tie tie requested a review from marsam as a code owner June 15, 2023 04:05
# Note that setting --with-pg-config=${postgresql}/bin/pg_config would add
# an unnecessary reference to the entire postgresql package.
buildFlags = [ "--with-pg-config=ignore" ];
nativeBuildInputs = [ pkg-config ];
Copy link
Member

Choose a reason for hiding this comment

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

just for reference, #234470 once that gets merged we can just switch to use libpq instead of postgresql

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, subscribed to PR updates.

@kirillrdy
Copy link
Member

Result of nixpkgs-review pr 237858 run on x86_64-linux 1

4 packages marked as broken and skipped:
  • discourse
  • discourseAllPlugins
  • rubyPackages_2_7.pg
  • rubyPackages_2_7.sequel_pg
15 packages built:
  • gitlab
  • gitlab-ee
  • ledger-web
  • mastodon
  • metasploit
  • msfpc
  • pgsync
  • redmine
  • rubyPackages.pg (rubyPackages_3_1.pg)
  • rubyPackages.sequel_pg (rubyPackages_3_1.sequel_pg)
  • rubyPackages_3_0.pg
  • rubyPackages_3_0.sequel_pg
  • rubyPackages_3_2.pg
  • rubyPackages_3_2.sequel_pg
  • social-engineer-toolkit

@tie just checking did you ommit broken/skipped packages ?

@tie
Copy link
Member Author

tie commented Jun 16, 2023

@kirillrdy, I’ve run nixpkgs-review rev --print-result HEAD, probably that’s why the output is different.

Thanks for pointing that out though, I’ve re-read nixpkgs-review docs and set up GitHub token to automatically post results to the PR.

@tie
Copy link
Member Author

tie commented Jun 16, 2023

Result of nixpkgs-review pr 237858 run on aarch64-linux 1

4 packages marked as broken and skipped:
  • discourse
  • discourseAllPlugins
  • rubyPackages_2_7.pg
  • rubyPackages_2_7.sequel_pg
15 packages built:
  • gitlab
  • gitlab-ee
  • ledger-web
  • mastodon
  • metasploit
  • msfpc
  • pgsync
  • redmine
  • rubyPackages.pg (rubyPackages_3_1.pg)
  • rubyPackages.sequel_pg (rubyPackages_3_1.sequel_pg)
  • rubyPackages_3_0.pg
  • rubyPackages_3_0.sequel_pg
  • rubyPackages_3_2.pg
  • rubyPackages_3_2.sequel_pg
  • social-engineer-toolkit

@tie
Copy link
Member Author

tie commented Jun 16, 2023

Result of nixpkgs-review pr 237858 run on aarch64-darwin 1

2 packages marked as broken and skipped:
  • rubyPackages_2_7.pg
  • rubyPackages_2_7.sequel_pg
10 packages built:
  • metasploit
  • msfpc
  • pgsync
  • rubyPackages.pg (rubyPackages_3_1.pg)
  • rubyPackages.sequel_pg (rubyPackages_3_1.sequel_pg)
  • rubyPackages_3_0.pg
  • rubyPackages_3_0.sequel_pg
  • rubyPackages_3_2.pg
  • rubyPackages_3_2.sequel_pg
  • social-engineer-toolkit

@tie tie requested a review from SuperSandro2000 June 18, 2023 07:43
@SuperSandro2000 SuperSandro2000 merged commit f83e137 into NixOS:master Jun 18, 2023
@github-actions
Copy link
Contributor

Successfully created backport PR for release-23.05:

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.

3 participants