fix?(package): postgreact: ~stir the stupid shit till it works [3]

This commit is contained in:
zerosummed
2025-04-18 21:37:23 +03:00
parent aec4876832
commit 60d977110c
7 changed files with 63 additions and 42 deletions

View File

@@ -1,11 +1,42 @@
{
lib,
}: {
stdenv,
postgresql,
...
}:
stdenv.mkDerivation rec {
pname = "postgreact";
version = "1.0";
src = ./.;
USE_PGXS = 1;
EXTENSION = pname;
EXTENSION_VERSION = version;
EXTENSION_COMMENT = meta.description;
buildInputs = [
postgresql
];
buildPhase = ''make all'';
installPhase = ''
mkdir -p $out/lib/postgresql $out/share/postgresql/extension
# Install compiled library
install -m 755 -D postgreact.so $out/lib/postgresql/postgreact.so
# Install control and SQL files
install -m 644 -D postgreact.control $out/share/postgresql/extension/postgreact.control
install -m 644 -D postgreact--${EXTENSION_VERSION}.sql $out/share/postgresql/extension/postgreact--${EXTENSION_VERSION}.sql
'';
meta = with lib; {
description = "PostgreSQL extension for simple templating.";
homepage = "https://github.com/yukkop/util.nix";
license = licenses.asl20;
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [];
};
}