2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, postgresql, getopt, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ephemeralpg";
|
2020-10-27 00:29:36 +00:00
|
|
|
version = "3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ephemeralpg.org/code/${pname}-${version}.tar.gz";
|
2020-10-27 00:29:36 +00:00
|
|
|
sha256 = "1ap22ki8yz6agd0qybcjgs4b9izw1rwwcgpxn3jah2ccfyax34s6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
PREFIX=$out make install
|
2021-02-05 17:12:51 +00:00
|
|
|
wrapProgram $out/bin/pg_tmp --prefix PATH : ${lib.makeBinPath [ postgresql getopt ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-10-27 00:29:36 +00:00
|
|
|
description = "Run tests on an isolated, temporary PostgreSQL database";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
homepage = "http://ephemeralpg.org/";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ hrdinka ];
|
|
|
|
};
|
|
|
|
}
|