2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, R, postgresql }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "plr";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "8.4.6";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "postgres-plr";
|
|
|
|
repo = "plr";
|
|
|
|
rev = "REL${builtins.replaceStrings ["."] ["_"] version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
sha256 = "sha256-c+wKWL66pulihVQnhdbzivrZOMD1/FfOpb+vFoHgqVg=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ R postgresql ];
|
|
|
|
preBuild = ''
|
|
|
|
export USE_PGXS=1
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
2023-10-19 13:55:26 +00:00
|
|
|
install -D plr${postgresql.dlSuffix} -t $out/lib/
|
2021-10-04 12:37:57 +00:00
|
|
|
install -D {plr--*.sql,plr.control} -t $out/share/postgresql/extension
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "PL/R - R Procedural Language for PostgreSQL";
|
|
|
|
homepage = "https://github.com/postgres-plr/plr";
|
|
|
|
maintainers = with maintainers; [ qoelet ];
|
2021-10-04 12:37:57 +00:00
|
|
|
platforms = postgresql.meta.platforms;
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
};
|
|
|
|
}
|