Commit Graph
17 Commits
Author SHA1 Message Date
Wolfgang Walther 18932b7a4a nix: use upstream GHC for static build
This way we benefit from NixOS' binary cache to deliver GHC for us and
don't need to cache it ourselves.

This will become relevant once we do that for more platforms.
2025-07-11 15:53:06 +00:00
Wolfgang Walther 067c181bb8 nix: remove libpq overlay
We have fixed the static build of PostgreSQL upstream, so we don't need
our separate overlay anymore. One more step towards building a static
executable on other platforms.
2025-07-11 15:53:06 +00:00
Wolfgang Walther 83c533e557 nix: refactor derivation tests for static package
Instead of rolling our own, we can use some tooling from nix / nixpkgs.

We drop the "statically linked" check, because our goal is to compile
mostly-static executables to darwin, too. However, those will never be
fully static, because they always link to the platform's libc.
2025-07-11 15:53:06 +00:00
Wolfgang WaltherandWolfgang Walther 04a14d5941 nix: remove pkgsCross workaround for libpq
This will make it much easier to actually cross-compile the static
executable to different systems.
2024-11-12 21:13:31 +01:00
closeobserveandWolfgang Walther 6b11332d6d chore: fix some comments 2024-08-02 09:01:15 +02:00
Wolfgang WaltherandWolfgang Walther a132a4fe2c chore(deps): update nixpkgs 2024-07-07 11:05:10 +02:00
Wolfgang Walther 70a8a80491 Revert "fix: Build static postgrest with GSSAPI support"
This reverts commit c94aa9ccd9.
2024-06-05 19:59:07 +02:00
Wolfgang Walther b4d235f72a nix: refactor to remove TODO
We have meanwhile received the commit in question.
2024-06-05 19:53:29 +02:00
Wolfgang Walther 6caaee777b nix: Simplify static.nix
The enable-executable-static flag is set by default, so doesn't make a difference.

The pkg-config improvement for libpq was merged upstream, so we can use the same
here already.
2024-02-24 15:38:02 +01:00
Wolfgang Walther ccc386cf38 nix: Add deadnix to postgrest-lint and remove dead nix code 2024-02-24 13:08:04 +01:00
Wolfgang Walther caf0a70171 nix: Clarify pkg-config usage in static.nix a bit
This will make it easier to make the switch from pkgsCross.libpq to pkgsStatic.libpq,
once that is possible to build upstream - if ever.
2024-02-24 12:08:40 +01:00
Wolfgang WaltherandWolfgang Walther cc9b725005 nix: Remove libkrb5 references from static executable 2024-02-06 10:19:31 +01:00
Wolfgang WaltherandWolfgang Walther f51090f3d1 nix: Check static executable for /nix/store references
This makes the static build fail in case any references to the nix store
are left over. Those will increase the closure size of the nix derivation
massively and lead to a huge docker image.

At the same time, those references will not be functional on non-nix systems,
to which the static executable is distributed, anyway.
2024-02-06 10:19:31 +01:00
Wolfgang WaltherandWolfgang Walther c43696c9a6 nix: Move postgrest-check-static inside derivation of static package
This will make the static build fail if we're not producing a static binary.
2024-01-26 23:24:12 +01:00
Wolfgang WaltherandWolfgang Walther c94aa9ccd9 fix: Build static postgrest with GSSAPI support
Resolves #2815
2024-01-26 17:17:05 +01:00
Wolfgang WaltherandWolfgang Walther 85fbb233a7 nix: Build only libpq instead of full postgresql package 2024-01-26 17:17:05 +01:00
Wolfgang WaltherandWolfgang Walther 259d97acee nix: Build static postgrest executable via pkgsStatic
This replaces the build via static-haskell-nix and will hopefully make
it possible to cross compile in the future.
2024-01-26 17:17:05 +01:00