Conversation
With the same reasoning as for postgresql's pg_config, we need to make adjustments to libpq's variant. Otherwise it would not return the correct LIBDIR, pointing at the -dev output instead of -out.
4d6b0d5 to
4b19142
Compare
| internalDeps = [ php.extensions.pdo ]; | ||
| buildInputs = [ libpq ]; | ||
| configureFlags = [ "--with-pdo-pgsql=${lib.getDev libpq}" ]; |
There was a problem hiding this comment.
@Ma27 we added libpq as a buildInput here as a last fix in #359659 (comment), even though we had it via --with-pdo-pgsql already.
This explains why - it now builds fine without passing it as extra buildInput again, because pg_config returns the right values.
| # build dependencies | ||
| bison, | ||
| flex, | ||
| makeWrapper, |
There was a problem hiding this comment.
How about using makeBinaryWrapper instead?
There was a problem hiding this comment.
I'd like to understand why one or the other would be better. I just looked up the nixpkgs manual, which reads:
Using the makeBinaryWrapper implementation is usually preferred, as it creates a tiny compiled wrapper executable, that can be used as a shebang interpreter. This is needed mostly on Darwin, where shebangs cannot point to scripts, due to a limitation with the execve-syscall.
I don't get what a shebang has to do with it. pg_config is surely not used as a shebang.
Why do you think makeBinaryWrapper is better?
There was a problem hiding this comment.
I just would simply use makeBinaryWrapper by default everywhere, since if offers better compatibility with Darwin systems. That's the only reason for me. Also, why do you use makeWrapper instead of makeBinaryWrapper ?
There was a problem hiding this comment.
Also, why do you use
makeWrapperinstead ofmakeBinaryWrapper?
Here? Just because generic.nix does the same.
There was a problem hiding this comment.
Fair enough. My comment was not a blocker so, feel free to implement what you prefer.
| cat << EOF > "$out/bin/pg_config" && chmod +x "$out/bin/pg_config" | ||
| #!${stdenv.shell} | ||
| echo The real pg_config can be found in the -dev output. | ||
| exit 1 | ||
| EOF |
There was a problem hiding this comment.
| cat << EOF > "$out/bin/pg_config" && chmod +x "$out/bin/pg_config" | |
| #!${stdenv.shell} | |
| echo The real pg_config can be found in the -dev output. | |
| exit 1 | |
| EOF | |
| cat << EOF > "$out/bin/pg_config" | |
| #!${stdenv.shell} | |
| echo The real pg_config can be found in the -dev output. | |
| exit 1 | |
| EOF | |
| chmod +x "$out/bin/pg_config" |
With the same reasoning as for postgresql's pg_config, we need to make adjustments to libpq's variant. Otherwise it would not return the correct LIBDIR, pointing at the -dev output instead of -out.
Fixes #359659 (comment)
@sternenseemann can you confirm?
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.