2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, v8, perl, postgresql }:
|
2017-06-24 04:05:20 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-31 03:00:00 +01:00
|
|
|
pname = "plv8";
|
2020-07-15 01:00:00 +01:00
|
|
|
version = "2.3.15";
|
2017-06-24 04:05:20 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
buildInputs = [ v8 postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plv8";
|
|
|
|
repo = "plv8";
|
|
|
|
rev = "v${version}";
|
2020-07-15 01:00:00 +01:00
|
|
|
sha256 = "1cv94n49gq2b377gqyq7pjjzw98czv4mwl3sx97y18c20zwp6rk3";
|
2017-06-24 04:05:20 +01:00
|
|
|
};
|
|
|
|
|
2019-07-02 10:20:00 +01:00
|
|
|
makefile = "Makefile.shared";
|
|
|
|
|
|
|
|
buildFlags = [ "all" ];
|
2018-11-04 14:21:07 +00:00
|
|
|
|
2017-06-24 04:05:20 +01:00
|
|
|
preConfigure = ''
|
2018-11-04 14:21:07 +00:00
|
|
|
patchShebangs ./generate_upgrade.sh
|
2017-06-24 04:05:20 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-11-04 14:21:07 +00:00
|
|
|
install -D plv8*.so -t $out/lib
|
2019-07-01 15:18:03 +01:00
|
|
|
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
|
2017-06-24 04:05:20 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-02 10:20:00 +01:00
|
|
|
description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL";
|
|
|
|
homepage = "https://plv8.github.io/";
|
2019-08-29 09:01:00 +01:00
|
|
|
maintainers = with maintainers; [ volth marsam ];
|
2019-08-29 09:00:00 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2017-06-24 04:05:20 +01:00
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|