Unverified Commit ef618a7a authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

libpqxx: enable tests, enable structuredAttrs (#476936)

parents 6ed815fd e22ded9d
Loading
Loading
Loading
Loading
+26 −1
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  gcc14Stdenv,
  fetchFromGitHub,
  libpq,
  python3,
  postgresql,
  postgresqlTestHook,
  autoreconfHook,
}:

stdenv.mkDerivation (finalAttrs: {
# Work around issue reported in https://github.com/NixOS/nixpkgs/issues/476278.
# Should be solved when libpqxx 8.x is released.
gcc14Stdenv.mkDerivation (finalAttrs: {
  pname = "libpqxx";
  version = "7.10.5";

@@ -23,6 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
  ];

  nativeBuildInputs = [
    # Needed because Makefile.am is patched to disable the tools/lint test.
    autoreconfHook
    python3
  ];

@@ -30,8 +38,19 @@ stdenv.mkDerivation (finalAttrs: {
    libpq
  ];

  nativeCheckInputs = [
    postgresql
    postgresqlTestHook
  ];

  postPatch = ''
    # Disable linting step for tests, it tries to install packages with pip.
    substituteInPlace Makefile.am \
      --replace-fail "TESTS = tools/lint" ""

    patchShebangs ./tools/splitconfig.py
    # Needed for autoreconfHook
    patchShebangs tools/*.py
  '';

  configureFlags = [
@@ -39,6 +58,12 @@ stdenv.mkDerivation (finalAttrs: {
    "--enable-shared"
  ];

  doCheck = true;

  enableParallelBuilding = true;

  __structuredAttrs = true;

  strictDeps = true;

  meta = {