From c0ea1836e0daa07ad04f36f02f6241543ae1cf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 16 Nov 2024 09:48:29 +0100 Subject: [PATCH 1/6] libpqxx: nixfmt Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com> --- pkgs/by-name/li/libpqxx/package.nix | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/li/libpqxx/package.nix b/pkgs/by-name/li/libpqxx/package.nix index 842be540a67f..018eb401bb3e 100644 --- a/pkgs/by-name/li/libpqxx/package.nix +++ b/pkgs/by-name/li/libpqxx/package.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, postgresql, python3 }: +{ + lib, + stdenv, + fetchFromGitHub, + postgresql, + python3, +}: stdenv.mkDerivation rec { pname = "libpqxx"; @@ -11,15 +17,24 @@ stdenv.mkDerivation rec { sha256 = "sha256-mvGPMbk4b8NmPvzy5hS+Au69NtDGha8ONTEQf6I3VZE="; }; - nativeBuildInputs = [ python3 ]; - buildInputs = [ postgresql ]; + nativeBuildInputs = [ + python3 + ]; + + buildInputs = [ + postgresql + ]; preConfigure = '' patchShebangs ./tools/splitconfig ''; - configureFlags = [ "--enable-shared --disable-documentation" ]; - CXXFLAGS = [ "-std=c++17" ]; + configureFlags = [ + "--enable-shared --disable-documentation" + ]; + CXXFLAGS = [ + "-std=c++17" + ]; meta = { description = "C++ library to access PostgreSQL databases"; From ca8cbf1c825564c2479f10b25bfb61d8fb52a0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 16 Nov 2024 09:50:54 +0100 Subject: [PATCH 2/6] libpqxx: move to finalAttrs pattern, refactor Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com> --- pkgs/by-name/li/libpqxx/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/li/libpqxx/package.nix b/pkgs/by-name/li/libpqxx/package.nix index 018eb401bb3e..4d1678799efb 100644 --- a/pkgs/by-name/li/libpqxx/package.nix +++ b/pkgs/by-name/li/libpqxx/package.nix @@ -6,15 +6,15 @@ python3, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libpqxx"; version = "7.7.5"; src = fetchFromGitHub { owner = "jtv"; - repo = pname; - rev = version; - sha256 = "sha256-mvGPMbk4b8NmPvzy5hS+Au69NtDGha8ONTEQf6I3VZE="; + repo = "libpqxx"; + rev = finalAttrs.version; + hash = "sha256-mvGPMbk4b8NmPvzy5hS+Au69NtDGha8ONTEQf6I3VZE="; }; nativeBuildInputs = [ @@ -43,4 +43,4 @@ stdenv.mkDerivation rec { platforms = lib.platforms.unix; maintainers = [ ]; }; -} +}) From 34b8fc2f53272d4d4fcaecd49635f86d7fb5e223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 16 Nov 2024 09:53:41 +0100 Subject: [PATCH 3/6] libpqxx: add and order `meta` attrs Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com> --- pkgs/by-name/li/libpqxx/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libpqxx/package.nix b/pkgs/by-name/li/libpqxx/package.nix index 4d1678799efb..eedc835c8ea6 100644 --- a/pkgs/by-name/li/libpqxx/package.nix +++ b/pkgs/by-name/li/libpqxx/package.nix @@ -37,10 +37,12 @@ stdenv.mkDerivation (finalAttrs: { ]; meta = { + changelog = "https://github.com/jtv/libpqxx/releases/tag/${finalAttrs.version}"; description = "C++ library to access PostgreSQL databases"; + downloadPage = "https://github.com/jtv/libpqxx"; homepage = "https://pqxx.org/development/libpqxx/"; license = lib.licenses.bsd3; - platforms = lib.platforms.unix; maintainers = [ ]; + platforms = lib.platforms.unix; }; }) From ec6a62b74c0578cead6f89af59183e6f1a50ba64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 16 Nov 2024 10:06:51 +0100 Subject: [PATCH 4/6] libpqxx: 7.7.5 -> 7.9.2 Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com> --- pkgs/by-name/li/libpqxx/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/li/libpqxx/package.nix b/pkgs/by-name/li/libpqxx/package.nix index eedc835c8ea6..73c7a2819aed 100644 --- a/pkgs/by-name/li/libpqxx/package.nix +++ b/pkgs/by-name/li/libpqxx/package.nix @@ -8,16 +8,17 @@ stdenv.mkDerivation (finalAttrs: { pname = "libpqxx"; - version = "7.7.5"; + version = "7.9.2"; src = fetchFromGitHub { owner = "jtv"; repo = "libpqxx"; rev = finalAttrs.version; - hash = "sha256-mvGPMbk4b8NmPvzy5hS+Au69NtDGha8ONTEQf6I3VZE="; + hash = "sha256-I5e0iqXlZqDOMa1PlnrxpcKt1c2mbnSbVQrpi1Gh25o="; }; nativeBuildInputs = [ + postgresql python3 ]; @@ -25,8 +26,8 @@ stdenv.mkDerivation (finalAttrs: { postgresql ]; - preConfigure = '' - patchShebangs ./tools/splitconfig + postPatch = '' + patchShebangs ./tools/splitconfig.py ''; configureFlags = [ From 9b12a53eb60ac0909fbb6264486bf9600ff7eb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 16 Nov 2024 10:10:22 +0100 Subject: [PATCH 5/6] libpqxx: remove unnecessary CXXFLAGS, enable strictDeps Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com> --- pkgs/by-name/li/libpqxx/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/li/libpqxx/package.nix b/pkgs/by-name/li/libpqxx/package.nix index 73c7a2819aed..c7e64c3f3e4f 100644 --- a/pkgs/by-name/li/libpqxx/package.nix +++ b/pkgs/by-name/li/libpqxx/package.nix @@ -31,12 +31,12 @@ stdenv.mkDerivation (finalAttrs: { ''; configureFlags = [ - "--enable-shared --disable-documentation" - ]; - CXXFLAGS = [ - "-std=c++17" + "--disable-documentation" + "--enable-shared" ]; + strictDeps = true; + meta = { changelog = "https://github.com/jtv/libpqxx/releases/tag/${finalAttrs.version}"; description = "C++ library to access PostgreSQL databases"; From 038f8684d00b9a54b23b6ea3348a9ef82193a9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 16 Nov 2024 10:11:41 +0100 Subject: [PATCH 6/6] libpqxx: split outputs Co-authored-by: superherointj <5861043+superherointj@users.noreply.github.com> --- pkgs/by-name/li/libpqxx/package.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/li/libpqxx/package.nix b/pkgs/by-name/li/libpqxx/package.nix index c7e64c3f3e4f..d2ed5b35c617 100644 --- a/pkgs/by-name/li/libpqxx/package.nix +++ b/pkgs/by-name/li/libpqxx/package.nix @@ -17,13 +17,18 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-I5e0iqXlZqDOMa1PlnrxpcKt1c2mbnSbVQrpi1Gh25o="; }; + outputs = [ + "out" + "dev" + ]; + nativeBuildInputs = [ - postgresql + postgresql.dev python3 ]; buildInputs = [ - postgresql + postgresql.lib ]; postPatch = ''