2019-03-13 02:38:58 +00:00
|
|
|
{ stdenv, fetchFromGitHub, postgresql, freetds }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tds_fdw";
|
2020-09-27 05:20:00 +01:00
|
|
|
version = "2.0.2";
|
2019-03-13 02:38:58 +00:00
|
|
|
|
|
|
|
buildInputs = [ postgresql freetds ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tds-fdw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2020-09-27 05:20:00 +01:00
|
|
|
sha256 = "024syj21gmdfkpr51l8ca70n5jimr35zwdy719b8h4zjn64ci1fk";
|
2019-03-13 02:38:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D tds_fdw.so -t $out/lib
|
2019-07-01 15:18:03 +01:00
|
|
|
install -D sql/tds_fdw--${version}.sql -t $out/share/postgresql/extension
|
|
|
|
install -D tds_fdw.control -t $out/share/postgresql/extension
|
2019-03-13 02:38:58 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/tds-fdw/tds_fdw";
|
2019-03-13 02:38:58 +00:00
|
|
|
maintainers = [ maintainers.steve-chavez ];
|
2019-05-06 12:00:00 +01:00
|
|
|
platforms = postgresql.meta.platforms;
|
2019-03-13 02:38:58 +00:00
|
|
|
license = licenses.postgresql;
|
2019-08-14 23:55:06 +01:00
|
|
|
broken = versionAtLeast postgresql.version "11.0";
|
2019-03-13 02:38:58 +00:00
|
|
|
};
|
|
|
|
}
|