git.iko.soy/typeable/nixpkgs
on master help sign in
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

commitb092bdccfacc7433e4fde52e8446948d77e61584 authorSteve Purcell <steve@sanityinc.com> dateFri 19 Mar 2021, 09:59 (6 years ago) parent54c1e44
4 files changed+33−28
pkgs/development/ruby-modules/gem-config/default.nix+10−1 pkgs/development/tools/sqlint/Gemfile.lock+5−3 pkgs/development/tools/sqlint/default.nix+3−20 pkgs/development/tools/sqlint/gemset.nix+15−4
pkgs/development/ruby-modules/gem-config/default.nix+10−1
@@ -211,7 +211,16 @@ in
211211 '';
212212 };
213213
214− pg_query = attrs: lib.optionalAttrs (attrs.version == "1.3.0") {
214+ pg_query = attrs: lib.optionalAttrs (attrs.version == "2.0.1") {
215+ dontBuild = false;
216+ postPatch = ''
217+ sed -i "s;'https://codeload.github.com.*';'${fetchurl {
218+ url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/13-2.0.0";
219+ sha256 = "0ghk0dlmrn634p3zjr41fy4ipgw8i44f67a4l8cspqg0395m3rp5";
220+ }}';" ext/pg_query/extconf.rb
221+ '';
222+ } // lib.optionalAttrs (attrs.version == "1.3.0") {
223+ # Needed for gitlab
215224 dontBuild = false;
216225 postPatch = ''
217226 sed -i "s;'https://codeload.github.com.*';'${fetchurl {
pkgs/development/tools/sqlint/Gemfile.lock+5−3
@@ -1,9 +1,11 @@
11GEM
22 remote: https://rubygems.org/
33 specs:
4− pg_query (1.2.0)
5− sqlint (0.1.10)
6− pg_query (~> 1)
4+ google-protobuf (3.15.6)
5+ pg_query (2.0.1)
6+ google-protobuf (~> 3.15.5)
7+ sqlint (0.2.0)
8+ pg_query (~> 2)
79
810PLATFORMS
911 ruby
pkgs/development/tools/sqlint/default.nix+3−20
@@ -1,35 +1,18 @@
1−{ lib, bundlerApp, fetchurl, bundlerUpdateScript }:
1+{ lib, bundlerApp, bundlerUpdateScript }:
22
3−let
4− LIB_PG_QUERY_TAG = "10-1.0.1";
5− libpgQuerySrc = fetchurl {
6− name = "libpg_query.tar.gz";
7− url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/${LIB_PG_QUERY_TAG}";
8− sha256 = "0m5jv134hgw2vcfkqlnw80fr3wmrdvgrvk1ndcx9s44bzi5nsp47";
9− };
10−in bundlerApp {
3+bundlerApp {
114 pname = "sqlint";
125 gemdir = ./.;
136
147 exes = [ "sqlint" ];
158
16− gemConfig = {
17− pg_query = attrs: {
18− dontBuild = false;
19− postPatch = ''
20− substituteInPlace ext/pg_query/extconf.rb \
21− --replace "#{workdir}/libpg_query.tar.gz" "${libpgQuerySrc}"
22− '';
23− };
24− };
25−
269 passthru.updateScript = bundlerUpdateScript "sqlint";
2710
2811 meta = with lib; {
2912 description = "Simple SQL linter";
3013 homepage = "https://github.com/purcell/sqlint";
3114 license = licenses.mit;
32− maintainers = with maintainers; [ ariutta nicknovitski ];
15+ maintainers = with maintainers; [ ariutta nicknovitski purcell ];
3316 platforms = with platforms; [ "x86_64-linux" "x86_64-darwin" ];
3417 };
3518}
pkgs/development/tools/sqlint/gemset.nix+15−4
@@ -1,13 +1,24 @@
11{
2+ google-protobuf = {
3+ groups = ["default"];
4+ platforms = [];
5+ source = {
6+ remotes = ["https://rubygems.org"];
7+ sha256 = "1ak5yqqhr04b4x0axzvpw1xzwmxmfcw0gf4r1ijixv15kidhsj3z";
8+ type = "gem";
9+ };
10+ version = "3.15.6";
11+ };
212 pg_query = {
13+ dependencies = ["google-protobuf"];
314 groups = ["default"];
415 platforms = [];
516 source = {
617 remotes = ["https://rubygems.org"];
7− sha256 = "0p9s6znavm6v5dwk1hxg9a8h2lrrwh9l0rlk0sy8cx4sq2mq82m1";
18+ sha256 = "01a8asbgkr7f1gp50ikzr1zzmvwv50da389943hrrqzxwd202268";
819 type = "gem";
920 };
10− version = "1.2.0";
21+ version = "2.0.1";
1122 };
1223 sqlint = {
1324 dependencies = ["pg_query"];
@@ -15,9 +26,9 @@
1526 platforms = [];
1627 source = {
1728 remotes = ["https://rubygems.org"];
18− sha256 = "0ds7qsaqi745fda8nliy15is36l1bkfbfkr43q6smpy103xbk44c";
29+ sha256 = "1ylicsc9x4vpj6ff3hmrm6iz1xswrwwgn1m7ri8nx86ij30w9hkk";
1930 type = "gem";
2031 };
21− version = "0.1.10";
32+ version = "0.2.0";
2233 };
2334}