nixpkgs/pkgs/servers/sql/postgresql/ext/plv8.nix
2019-07-02 04:20:00 -05:00

39 lines
1.0 KiB
Nix

{ stdenv, fetchFromGitHub, v8, perl, postgresql }:
stdenv.mkDerivation rec {
pname = "plv8";
version = "2.3.12";
nativeBuildInputs = [ perl ];
buildInputs = [ v8 postgresql ];
src = fetchFromGitHub {
owner = "plv8";
repo = "plv8";
rev = "v${version}";
sha256 = "1yi1ibiibvd0x4z5dm698w32ljrj3yr4j25jm1zkgkwd4ii8y644";
};
makefile = "Makefile.shared";
buildFlags = [ "all" ];
preConfigure = ''
patchShebangs ./generate_upgrade.sh
'';
installPhase = ''
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
install -D plv8*.so -t $out/lib
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
'';
meta = with stdenv.lib; {
description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL";
homepage = "https://plv8.github.io/";
maintainers = with maintainers; [ volth ];
platforms = platforms.linux;
license = licenses.postgresql;
};
}