nixpkgs/pkgs/servers/sql/postgresql/ext/plv8.nix

38 lines
963 B
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, v8, perl, postgresql }:
2017-06-24 04:05:20 +01:00
stdenv.mkDerivation rec {
pname = "plv8";
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}";
sha256 = "1cv94n49gq2b377gqyq7pjjzw98czv4mwl3sx97y18c20zwp6rk3";
2017-06-24 04:05:20 +01:00
};
makefile = "Makefile.shared";
buildFlags = [ "all" ];
2017-06-24 04:05:20 +01:00
preConfigure = ''
patchShebangs ./generate_upgrade.sh
2017-06-24 04:05:20 +01:00
'';
installPhase = ''
install -D plv8*.so -t $out/lib
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
2017-06-24 04:05:20 +01:00
'';
meta = with lib; {
description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL";
homepage = "https://plv8.github.io/";
maintainers = with maintainers; [ volth marsam ];
platforms = [ "x86_64-linux" ];
2017-06-24 04:05:20 +01:00
license = licenses.postgresql;
};
}