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";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2024-02-07 01:22:34 +00:00
|
|
|
url = "https://eradman.com/ephemeralpg/code/${pname}-${version}.tar.gz";
|
|
|
|
hash = "sha256-pVQrfSpwJnxCRXAUpZQZsb0Z/wlLbjdaYmhVevgHrgo=";
|
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;
|
2024-02-07 01:22:34 +00:00
|
|
|
homepage = "https://eradman.com/ephemeralpg/";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
2024-02-07 01:22:34 +00:00
|
|
|
maintainers = with maintainers; [ hrdinka medv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|