2019-07-22 13:02:47 +01:00
|
|
|
{ lib, bundlerApp, fetchurl, bundlerUpdateScript }:
|
2018-06-12 22:00:23 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
LIB_PG_QUERY_TAG = "10-1.0.1";
|
|
|
|
libpgQuerySrc = fetchurl {
|
|
|
|
name = "libpg_query.tar.gz";
|
|
|
|
url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/${LIB_PG_QUERY_TAG}";
|
|
|
|
sha256 = "0m5jv134hgw2vcfkqlnw80fr3wmrdvgrvk1ndcx9s44bzi5nsp47";
|
|
|
|
};
|
|
|
|
in bundlerApp {
|
|
|
|
pname = "sqlint";
|
|
|
|
gemdir = ./.;
|
|
|
|
|
|
|
|
exes = [ "sqlint" ];
|
|
|
|
|
|
|
|
gemConfig = {
|
|
|
|
pg_query = attrs: {
|
|
|
|
dontBuild = false;
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ext/pg_query/extconf.rb \
|
|
|
|
--replace "#{workdir}/libpg_query.tar.gz" "${libpgQuerySrc}"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-07-22 13:02:47 +01:00
|
|
|
passthru.updateScript = bundlerUpdateScript "sqlint";
|
|
|
|
|
2018-06-12 22:00:23 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple SQL linter";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/purcell/sqlint";
|
2018-06-12 22:00:23 +01:00
|
|
|
license = licenses.mit;
|
2019-07-22 13:02:47 +01:00
|
|
|
maintainers = with maintainers; [ ariutta nicknovitski ];
|
2018-06-12 22:00:23 +01:00
|
|
|
platforms = with platforms; [ "x86_64-linux" "x86_64-darwin" ];
|
|
|
|
};
|
|
|
|
}
|