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

Bump nixpkgs and simplify/clean up nix setup #1529

Merged
merged 4 commits into from
May 21, 2020

Conversation

monacoremo
Copy link
Member

@monacoremo monacoremo commented May 19, 2020

This is on top of #1528, will rebase. Update: rebased.

Now that we have a pretty complete Nix setup and gained some experience, I noticed some opportunities to simplify the Nix setup. Fixes include:

  • Explicitly set the default Postgresql version we want to use in an overlay (this will also be the version that libpq is taken from)
  • Explicitly specify the GHC version being used when accessing haskellPackages (this and the one above makes the setup more independent from changes in Nixpkgs)
  • Merge the scripts related to development into one Nix file, devtools.nix - no real need to have them in separate files
  • Merge the haskellPackages overlay for static and dynamic builds (should more maintainable, as changes don't need to be synced between the two anymore)
  • Only have the major versions of the different Postgresql versions in the testing script names (i.e. 9.4 instead of 9.4.27, easier to use locally and potentially in CI)
  • Add a recommendation for cachix use postgrest in the README
  • Pin protolude using callHackageDirect, instead of creating a local file with cabal2nix

I also bumped Nixpkgs to the current nixpkgs-unstable version, which caused no major changes.* I think it's good if we track unstable closely for now, at least until all our patches and already merged PRs have landed in a stable version.

*edit: It did yield new hlint hints and nixpkgs-fmt formatting changes, both added in separate commits.

Those a quite a few changes, but as everything is related to the Nix setup I hope it's still good to review!

@monacoremo monacoremo force-pushed the monacoremo-nix-cleanup branch 3 times, most recently from 038c280 to 19f9c7d Compare May 20, 2020 12:52
@monacoremo monacoremo marked this pull request as ready for review May 20, 2020 13:01
@steve-chavez
Copy link
Member

Looks good!

I gave it a look and also tried the new postgrest-test-spec commands, I like the shorter version numbers.

Combining the static and dynamic build into a single config is great. Btw, maybe we can later leverage this to build a static bin for arm64. There was some work for this on #1117 (comment), but there were some issues.

Merging now!

@steve-chavez steve-chavez merged commit 48c9ac3 into PostgREST:master May 21, 2020
@monacoremo monacoremo mentioned this pull request May 21, 2020
monacoremo added a commit to monacoremo/postgrest that referenced this pull request Jul 17, 2021
* Refactor tests and fix README

* fix linting hints from new hlint version

* postgrest-style with new nixpkgs-fmt
@monacoremo monacoremo deleted the monacoremo-nix-cleanup branch July 27, 2021 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants