diff options
author | Anders Riutta <git@andersriutta.com> | 2018-06-12 14:00:23 -0700 |
---|---|---|
committer | Anders Riutta <git@andersriutta.com> | 2018-06-17 01:03:21 -0700 |
commit | 5fb615d990031cbde5048c62622bb8c65c4d6980 (patch) | |
tree | 846401cb93ee4a0f965b8538222c6cd9e392b42b /pkgs/development/tools/sqlint | |
parent | 274bb96073d9b263821dc68a1d2d65bec24b99f2 (diff) | |
download | nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.tar nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.tar.gz nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.tar.bz2 nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.tar.lz nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.tar.xz nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.tar.zst nixpkgs-5fb615d990031cbde5048c62622bb8c65c4d6980.zip |
sqlint: init at 0.1.7. ht @ryantm.
Diffstat (limited to 'pkgs/development/tools/sqlint')
-rw-r--r-- | pkgs/development/tools/sqlint/Gemfile | 2 | ||||
-rw-r--r-- | pkgs/development/tools/sqlint/Gemfile.lock | 17 | ||||
-rw-r--r-- | pkgs/development/tools/sqlint/default.nix | 34 | ||||
-rw-r--r-- | pkgs/development/tools/sqlint/gemset.nix | 28 |
4 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/development/tools/sqlint/Gemfile b/pkgs/development/tools/sqlint/Gemfile new file mode 100644 index 00000000000..7f045baeaa0 --- /dev/null +++ b/pkgs/development/tools/sqlint/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'sqlint' diff --git a/pkgs/development/tools/sqlint/Gemfile.lock b/pkgs/development/tools/sqlint/Gemfile.lock new file mode 100644 index 00000000000..1fd44e97b99 --- /dev/null +++ b/pkgs/development/tools/sqlint/Gemfile.lock @@ -0,0 +1,17 @@ +GEM + remote: https://rubygems.org/ + specs: + json (2.1.0) + pg_query (1.0.0) + json (>= 1.8, < 3) + sqlint (0.1.7) + pg_query (~> 0.13.5) + +PLATFORMS + ruby + +DEPENDENCIES + sqlint + +BUNDLED WITH + 1.14.6 diff --git a/pkgs/development/tools/sqlint/default.nix b/pkgs/development/tools/sqlint/default.nix new file mode 100644 index 00000000000..67fbd09f102 --- /dev/null +++ b/pkgs/development/tools/sqlint/default.nix @@ -0,0 +1,34 @@ +{ lib, bundlerApp, fetchurl, ruby }: + +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 = ./.; + inherit ruby; + + exes = [ "sqlint" ]; + + gemConfig = { + pg_query = attrs: { + dontBuild = false; + postPatch = '' + substituteInPlace ext/pg_query/extconf.rb \ + --replace "#{workdir}/libpg_query.tar.gz" "${libpgQuerySrc}" + ''; + }; + }; + + meta = with lib; { + description = "Simple SQL linter"; + homepage = https://github.com/purcell/sqlint; + license = licenses.mit; + maintainers = with maintainers; [ ariutta ]; + 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 new file mode 100644 index 00000000000..d2802a91703 --- /dev/null +++ b/pkgs/development/tools/sqlint/gemset.nix @@ -0,0 +1,28 @@ +{ + json = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"; + type = "gem"; + }; + version = "2.1.0"; + }; + pg_query = { + dependencies = ["json"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0zgwnrf5mkpkxfh49r2pvh2djivrbqd19350g8hxapmkya9w3qpi"; + type = "gem"; + }; + version = "1.0.0"; + }; + sqlint = { + dependencies = ["pg_query"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1wm81dgdmgc16b97bz73vm0wjd2m1ra1b40h0kwfd9wgrh9ig2al"; + type = "gem"; + }; + version = "0.1.7"; + }; +} |