-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
haskellPackages.postgresql-libpq-configure: unbreak #350404
haskellPackages.postgresql-libpq-configure: unbreak #350404
Conversation
61705be
to
bad5f8d
Compare
@@ -1336,6 +1336,11 @@ self: super: { | |||
pkgs.postgresqlTestHook | |||
] super.postgresql-simple; | |||
|
|||
# Requires pg_config program from postgresql. | |||
postgresql-libpq-configure = addBuildTool pkgs.postgresql super.postgresql-libpq-configure; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we also need psotgresql in library depends additionally?
Is this enough to build I think it's not, yet. I went down that rabbit hole yesterday - the flag would need to be set for cabal2nix, to generate the right dependencies in It would be really cool if cabal2nix wouldn't just use one flag hardcoded, but would output an expression with conditionals instead.. something like: "postgresql-libpq_0_11_0_0" = callPackage
({ mkDerivation, ...
, usePkgConfig ? false
}:
mkDerivation {
...
libraryHaskellDepends = [
base bytestring unix
] ++ lib.optionals usePkgConfig [ postgresql-libpq-pkgconfig ]
++ lib.optionals (!usePkgConfig [ postgresql-libpq-configure ];
...
}) {}; With that system we could also support cross-compiling better because Ok, anyway, back to reality - how can we fix it here, so that |
Seems like this has been done in 7b995f0. |
@wolfgangwalther Unfortunately, I agree that it would interesting to be able to generate expressions like that, but unfortunately it seems that we would to more or less completely reengineer On the amount of hardcoded stuff in cabal2nix, see also NixOS/cabal2nix#504. I think the solution is probably to make all these hardcoded things configurable, e.g. NixOS/cabal2nix#594. |
This gets the two haskell packages
postgresql-libpq-configure
andpostgresql-libpq-pkgconfig
building.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-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.