7e47f3658e
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
31 lines
869 B
Nix
31 lines
869 B
Nix
{ lib, stdenv, fetchFromGitHub, pkg-config, R, postgresql }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "plr";
|
|
version = "8.4.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "postgres-plr";
|
|
repo = "plr";
|
|
rev = "REL${builtins.replaceStrings ["."] ["_"] version}";
|
|
sha256 = "sha256-c+wKWL66pulihVQnhdbzivrZOMD1/FfOpb+vFoHgqVg=";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ R postgresql ];
|
|
|
|
makeFlags = [ "USE_PGXS=1" ];
|
|
|
|
installPhase = ''
|
|
install -D plr${postgresql.dlSuffix} -t $out/lib/
|
|
install -D {plr--*.sql,plr.control} -t $out/share/postgresql/extension
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "PL/R - R Procedural Language for PostgreSQL";
|
|
homepage = "https://github.com/postgres-plr/plr";
|
|
maintainers = with maintainers; [ qoelet ];
|
|
platforms = postgresql.meta.platforms;
|
|
license = licenses.gpl2Only;
|
|
};
|
|
}
|