- the override did nothing to curl
- openssl was implicitly linked against (due to being in curl's
pkgconfig file)
- and I put openssl before curl, so only it could be overridden
They are not doing anything right now. This is in preparation for their
complete removal from the tree.
Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.
Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk
Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:
nix-build ci -A fmt.check
This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).
This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).
Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).
If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
Because of [1], we can't run initdb / postgres inside the darwin
sandbox, even though it succeeds most of the time. It will lead to hard
to debug build failures eventually.
Since pgrx runs initdb as part of the build... there seems to be no
other way than marking those packages as broken for now. This could be
relaxed once [2] is available, because we could then disable the
checkPhase and all "initdb" for pgrx on darwin.
[1]:
https://github.com/NixOS/nixpkgs/issues/371242#issuecomment-2672697582
[2]: https://github.com/pgcentralfoundation/pgrx/pull/1994
Doing
cargoBuildFlags = [ "-p" "foo" ]
doesn't work here since this gets only passed to PGRX_BUILD_FLAGS which
in turn is used by `cargo build`.
This means that pgrx itself doesn't know of the workspace setup and
fails with
Error:
0: Couldn't get manifest path
1: `pgrx` requires a root package in a workspace when `--package` is not specified.
This patch introduces another flag called `cargoPgrxFlags` to do the
right thing, i.e. to pass this to each pgrx invocation.
Using `cargoBuildFlags` is not reasonable here since `cargo build`
accepts flags that may not be valid when invoking `cargo pgrx` (e.g. `-r`).
By replacing upstream's pg_config binary with a shell script, we:
- gain the ability to run pg_config easily when cross-compiling,
- can remove the fake pg_config in the default output,
- can remove the pg_config wrapper script dealing with special cases.
Some 20 years ago, pg_config *was* a shell script upstream, too. It was
changed to a binary, when it was made "relocatable", so it would return
paths depending on the location of the "postgres" binary. However, this
is exactly the thing that just hurts us in nixpkgs - we don't want those
paths to change, we want them to always point at the right outputs. By
writing the script ourselves, this becomes a lot less painful.
This approach means more lines of codes, but all of them are dead simple
and we have a lot less complexity overall.
Additionally, pg_config is now made a separate derivation, only exposed
as "postgresql.pg_config". This has the nice side-effect, that all users
of postgresql and libpq in nixpkgs must be very *explicit* about their
dependency on pg_config. This gives a lot more visibility into the state
of affairs regarding pkg-config support for libpq, which ultimately is
the much better solution.