about summary refs log tree commit diff
path: root/pkgs/development/tools/sqlint
diff options
context:
space:
mode:
authorSteve Purcell <steve@sanityinc.com>2021-03-19 09:59:09 +1300
committertomberek <tomberek@users.noreply.github.com>2021-04-02 00:28:17 -0400
commitb092bdccfacc7433e4fde52e8446948d77e61584 (patch)
treebb56320b32ee10202b07af8761d00ee483fe1a46 /pkgs/development/tools/sqlint
parent54c1e44240d8a527a8f4892608c4bce5440c3ecb (diff)
sqlint: 0.1.10 -> 0.2.0
- Updates libpg_query to 2.0.0 in gem config, used by pg_query gem 2.0.1
- Continue to support older gem with older libpg_query, for gitlab
- Remove redundant gem config override in sqlint expression
- Add myself as a maintainer
Diffstat (limited to 'pkgs/development/tools/sqlint')
-rw-r--r--pkgs/development/tools/sqlint/Gemfile.lock8
-rw-r--r--pkgs/development/tools/sqlint/default.nix23
-rw-r--r--pkgs/development/tools/sqlint/gemset.nix19
3 files changed, 23 insertions, 27 deletions
diff --git a/pkgs/development/tools/sqlint/Gemfile.lock b/pkgs/development/tools/sqlint/Gemfile.lock
index a57d1811b19ec..67d348974fe7d 100644
--- a/pkgs/development/tools/sqlint/Gemfile.lock
+++ b/pkgs/development/tools/sqlint/Gemfile.lock
@@ -1,9 +1,11 @@
 GEM
   remote: https://rubygems.org/
   specs:
-    pg_query (1.2.0)
-    sqlint (0.1.10)
-      pg_query (~> 1)
+    google-protobuf (3.15.6)
+    pg_query (2.0.1)
+      google-protobuf (~> 3.15.5)
+    sqlint (0.2.0)
+      pg_query (~> 2)
 
 PLATFORMS
   ruby
diff --git a/pkgs/development/tools/sqlint/default.nix b/pkgs/development/tools/sqlint/default.nix
index f9c535cc2baf1..e81bc4fc5d5d2 100644
--- a/pkgs/development/tools/sqlint/default.nix
+++ b/pkgs/development/tools/sqlint/default.nix
@@ -1,35 +1,18 @@
-{ lib, bundlerApp, fetchurl, bundlerUpdateScript }:
+{ lib, bundlerApp, bundlerUpdateScript }:
 
-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 {
+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}"
-      '';
-    };
-  };
-
   passthru.updateScript = bundlerUpdateScript "sqlint";
 
   meta = with lib; {
     description = "Simple SQL linter";
     homepage    = "https://github.com/purcell/sqlint";
     license     = licenses.mit;
-    maintainers = with maintainers; [ ariutta nicknovitski ];
+    maintainers = with maintainers; [ ariutta nicknovitski purcell ];
     platforms   = with platforms; [ "x86_64-linux" "x86_64-darwin" ];
   };
 }
diff --git a/pkgs/development/tools/sqlint/gemset.nix b/pkgs/development/tools/sqlint/gemset.nix
index aeffdccffa139..f2389e5d90b22 100644
--- a/pkgs/development/tools/sqlint/gemset.nix
+++ b/pkgs/development/tools/sqlint/gemset.nix
@@ -1,13 +1,24 @@
 {
+  google-protobuf = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1ak5yqqhr04b4x0axzvpw1xzwmxmfcw0gf4r1ijixv15kidhsj3z";
+      type = "gem";
+    };
+    version = "3.15.6";
+  };
   pg_query = {
+    dependencies = ["google-protobuf"];
     groups = ["default"];
     platforms = [];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0p9s6znavm6v5dwk1hxg9a8h2lrrwh9l0rlk0sy8cx4sq2mq82m1";
+      sha256 = "01a8asbgkr7f1gp50ikzr1zzmvwv50da389943hrrqzxwd202268";
       type = "gem";
     };
-    version = "1.2.0";
+    version = "2.0.1";
   };
   sqlint = {
     dependencies = ["pg_query"];
@@ -15,9 +26,9 @@
     platforms = [];
     source = {
       remotes = ["https://rubygems.org"];
-      sha256 = "0ds7qsaqi745fda8nliy15is36l1bkfbfkr43q6smpy103xbk44c";
+      sha256 = "1ylicsc9x4vpj6ff3hmrm6iz1xswrwwgn1m7ri8nx86ij30w9hkk";
       type = "gem";
     };
-    version = "0.1.10";
+    version = "0.2.0";
   };
 }