From 90f588843acac52d4f9f18060af8bf59c2ffe9ad Mon Sep 17 00:00:00 2001 From: zerosummed Date: Thu, 17 Apr 2025 07:01:23 +0300 Subject: [PATCH] fix?(package): `postgreact`: ~stir the stupid shit till it works [1] --- flake.nix | 20 ++++++++++++++++++-- package/c/postgreact/default.nix | 24 +++--------------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index 7d2e45f..036a170 100644 --- a/flake.nix +++ b/flake.nix @@ -428,7 +428,7 @@ doCheck = false; }; buildPlHaskellExt = versionSuffix: let - version = "4.0"; + version = "4.0"; # XXX(nrv): What the hell is this? What the hell are all the `version` mentions below? Is it that? in buildPostgresqlExtension { postgresql = prev."postgresql_${versionSuffix}"; @@ -457,6 +457,22 @@ }; nativeBuildInputs = with prev; [pkg-config curl]; }; + buildPostgreactExt = versionSuffix: + buildPostgresqlExtension { + postgresql = prev."postgresql_${versionSuffix}"; + } (rec { + pname = "postgreact"; + version = "1.0"; + src = ./package/c/${pname}; + nativeBuildInputs = with prev; [pkg-config]; # ??? + meta = with lib; { + description = "PostgreSQL extension for simple templating."; + homepage = "https://github.com/hectic-lab/util.nix"; + license = licenses.asl20; + platforms = postgresql.meta.platforms; + maintainers = with maintainers; []; + }; + }); in { hectic = self.packages.${prev.system}; postgresql_17 = @@ -490,9 +506,9 @@ prev.postgresql_15.pkgs // { http = buildHttpExt "15"; + postgreact = buildPostgreactExt "15"; pg_smtp_client = buildSmtpExt "15"; plhaskell = buildPlHaskellExt "15"; - postgreact = self.packages.${prev.system}.postgreact.override {postgresql = prev.postgresql_17;}; }; }; postgresql_14 = diff --git a/package/c/postgreact/default.nix b/package/c/postgreact/default.nix index d985bb8..b6eb38a 100644 --- a/package/c/postgreact/default.nix +++ b/package/c/postgreact/default.nix @@ -1,30 +1,12 @@ { lib, - stdenv, - fetchFromGitHub, - curl, - postgresql, - buildPostgresqlExtension, -}: -buildPostgresqlExtension rec { +}: { pname = "postgreact"; version = "1.0"; + src = ./.; + buildInputs = [ ]; - EXTENSION = pname; - EXTENSION_VERSION = version; - - src = ./.; - - env.NIX_CFLAGS_COMPILE = "-Wno-error"; - - meta = with lib; { - description = "PostgreSQL extension for simple templating."; - homepage = "https://github.com/hectic-lab/util.nix"; - license = licenses.asl20; - platforms = postgresql.meta.platforms; - maintainers = with maintainers; []; - }; }