2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, postgresql }:
|
2019-06-09 19:26:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pg-safeupdate";
|
2022-05-11 23:50:44 +00:00
|
|
|
version = "1.4";
|
2019-06-09 19:26:15 +00:00
|
|
|
|
|
|
|
buildInputs = [ postgresql ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eradman";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-05-11 23:50:44 +00:00
|
|
|
sha256 = "sha256-1cyvVEC9MQGMr7Tg6EUbsVBrMc8ahdFS3+CmDkmAq4Y=";
|
2019-06-09 19:26:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin # for buildEnv, see https://github.com/NixOS/nixpkgs/issues/22653
|
|
|
|
install -D safeupdate.so -t $out/lib
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-09 19:26:15 +00:00
|
|
|
description = "A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE";
|
|
|
|
homepage = "https://github.com/eradman/pg-safeupdate";
|
|
|
|
platforms = postgresql.meta.platforms;
|
|
|
|
license = licenses.postgresql;
|
|
|
|
};
|
|
|
|
}
|