From cf387b1aed88657a933769bf2e05e23641324d47 Mon Sep 17 00:00:00 2001 From: Farid Zakaria Date: Wed, 15 Oct 2025 19:24:22 -0700 Subject: [PATCH] httplib: added pkgconfig nix: update to inherit Co-authored-by: Masum Reza <50095635+JohnRTitor@users.noreply.github.com> --- pkgs/by-name/ht/httplib/package.nix | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ht/httplib/package.nix b/pkgs/by-name/ht/httplib/package.nix index 655bcd363afe..60cab3dd28ac 100644 --- a/pkgs/by-name/ht/httplib/package.nix +++ b/pkgs/by-name/ht/httplib/package.nix @@ -4,8 +4,9 @@ fetchFromGitHub, openssl, stdenv, + copyPkgconfigItems, + makePkgconfigItem, }: - stdenv.mkDerivation (finalAttrs: { pname = "httplib"; version = "0.19.0"; @@ -17,18 +18,36 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-OLwD7mpwqG7BUugUca+CJpPMaabJzUMC0zYzJK9PBCg="; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + copyPkgconfigItems + ]; buildInputs = [ openssl ]; strictDeps = true; + pkgconfigItems = [ + (makePkgconfigItem rec { + name = "httplib"; + inherit (finalAttrs) version; + cflags = [ "-I${variables.includedir}" ]; + variables = rec { + prefix = placeholder "out"; + includedir = "${prefix}/include"; + }; + inherit (finalAttrs.meta) description; + }) + ]; + meta = { homepage = "https://github.com/yhirose/cpp-httplib"; description = "C++ header-only HTTP/HTTPS server and client library"; changelog = "https://github.com/yhirose/cpp-httplib/releases/tag/${finalAttrs.src.rev}"; license = lib.licenses.mit; - maintainers = [ ]; + maintainers = with lib.maintainers; [ + fzakaria + ]; platforms = lib.platforms.all; }; })