Skip to content

haskellPackages.postgrest: 10.1.1 -> 12.0.2 and fix build#275614

Merged
maralorn merged 4 commits intoNixOS:haskell-updatesfrom
SFrijters:haskell-packages-postgrest-update-fix
Jan 1, 2024
Merged

haskellPackages.postgrest: 10.1.1 -> 12.0.2 and fix build#275614
maralorn merged 4 commits intoNixOS:haskell-updatesfrom
SFrijters:haskell-packages-postgrest-update-fix

Conversation

@SFrijters
Copy link
Copy Markdown
Member

Description of changes

Fixes #271868.

@maralorn : First attempt at fixing, please advise on improvements.

One issue that confused/surprised me is that the default hasql-pool package is the 0.9 version, while the newer 0.10 version that is on Hackage is hasql-pool_0_10. Does the stackage override take precedence?

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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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 the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Dec 20, 2023
@SFrijters SFrijters force-pushed the haskell-packages-postgrest-update-fix branch from 924bfbe to 5c0167d Compare December 20, 2023 11:07
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 20, 2023
@rvl
Copy link
Copy Markdown
Contributor

rvl commented Dec 23, 2023

One issue that confused/surprised me is that the default hasql-pool package is the 0.9 version, while the newer 0.10 version that is on Hackage is hasql-pool_0_10. Does the stackage override take precedence?

Yes, the haskellPackages set in nixpkgs is derived primarily from stackage. In PR #272097, the stackage version is updated to LTS 21.23. For reasons of compatibility with other packages and/or ghc-9.4, the Stackage version of hasql-pool is kept down at 0.9.0.1. The latest Hackage release of hasql-pool is also available to nixpkgs, for cases like postgrest. See this note in main.yml.

@rvl
Copy link
Copy Markdown
Contributor

rvl commented Dec 23, 2023

I notice there's a v12.0.2 now. I made a PR SFrijters#3 to update. It builds but I haven't tested it apart from running ./result/bin/postgrest --help.

@SFrijters SFrijters force-pushed the haskell-packages-postgrest-update-fix branch from 6514aec to 158ff8c Compare December 23, 2023 08:56
@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Dec 23, 2023
@SFrijters
Copy link
Copy Markdown
Member Author

Rebased on latest haskell-updates, added a NixOS test, incorporated the changes added by @rvl .

@SFrijters SFrijters changed the title haskellPackages.postgrest: 10.1.1 -> 11.2.2 and fix build haskellPackages.postgrest: 10.1.1 -> 12.0.2 and fix build Dec 23, 2023
@SFrijters
Copy link
Copy Markdown
Member Author

Maybe the nixos test is overkill; I noticed that postgrest has some Nix infrastructure so maybe we can override our checkPhase to call something from https://github.com/PostgREST/postgrest/tree/main/nix#testing ?

@rvl
Copy link
Copy Markdown
Contributor

rvl commented Dec 23, 2023

The nixos test would be overkill, unless it's for testing a postgrest nixos module.

I would be inclined to say that running the postgrest haskell package tests is more trouble than it's worth. But perhaps there are a subset of tests which don't need a postgresql server. In that case you could set testTarget and/or testFlags to filter test suites and test cases.

The authors of postgrest may have some suggestions about what could be put in the checkPhase of this package.

@SFrijters SFrijters force-pushed the haskell-packages-postgrest-update-fix branch from 158ff8c to 0cd1da5 Compare December 23, 2023 23:09
@github-actions github-actions bot removed the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Dec 23, 2023
@SFrijters
Copy link
Copy Markdown
Member Author

Ok, dropped the nixosTest commit for now. I'll keep it around on a branch to test any later updates manually.

@Zer0-
Copy link
Copy Markdown
Contributor

Zer0- commented Dec 26, 2023

Thank you so much for doing this work!

Copy link
Copy Markdown
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

You will probably need to regenerate hackage-packages.nix after rebasing to avoid de-syncing and/or merge conflicts.

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 27, 2023
@SFrijters SFrijters force-pushed the haskell-packages-postgrest-update-fix branch from 0cd1da5 to 4409608 Compare December 28, 2023 09:18
@SFrijters
Copy link
Copy Markdown
Member Author

Rebased, added completion, ran regenerate-hackage-packages.sh (was not necessary as far as I can see).

@delroth delroth removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 28, 2023
Copy link
Copy Markdown
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.

Sorry for only coming back to this now. It was a busy … year.

This PR already looks very good, thank you! Still, I have a few improvement suggestions.

@SFrijters SFrijters force-pushed the haskell-packages-postgrest-update-fix branch from 4409608 to 1c17b93 Compare January 1, 2024 22:15
@SFrijters SFrijters force-pushed the haskell-packages-postgrest-update-fix branch from 1c17b93 to 111c8d7 Compare January 1, 2024 22:20
@SFrijters
Copy link
Copy Markdown
Member Author

Addressed review comments (I hope), rebased on latest haskell-updates.

@maralorn
Copy link
Copy Markdown
Member

maralorn commented Jan 1, 2024

Thank you! Exzellent!

@maralorn maralorn merged commit f8fc00b into NixOS:haskell-updates Jan 1, 2024
@SFrijters SFrijters deleted the haskell-packages-postgrest-update-fix branch January 2, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants