2017-06-24 05:05:20 +02:00
|
|
|
{ stdenv, fetchFromGitHub, v8, perl, postgresql }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "plv8-${version}";
|
2017-10-15 15:45:08 +02:00
|
|
|
version = "2.1.0";
|
2017-06-24 05:05:20 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
buildInputs = [ v8 postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plv8";
|
|
|
|
repo = "plv8";
|
|
|
|
rev = "v${version}";
|
2017-10-15 15:45:08 +02:00
|
|
|
sha256 = "1sfpxz0zcbinn6822j12lkwgrw9kfacrs83ic968rm489rl9w241";
|
2017-06-24 05:05:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace Makefile --replace '-lv8_libplatform' '-lv8_libplatform -lv8_libbase'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D plv8.so -t $out/lib
|
|
|
|
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/extension
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "PL/v8 - A Procedural Language in JavaScript powered by V8";
|
|
|
|
homepage = https://pgxn.org/dist/plv8/;
|
|
|
|
maintainers = with maintainers; [ volth ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|