aboutsummaryrefslogtreecommitdiff
path: root/.config/nixpkgs/packages/sqlfluff/default.nix
blob: 0030d31e02b69ff3fcacb87ff22a5f421cb95c8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ stdenv, fetchgit, python36 }:

with python36.pkgs;

let

  bench-it = buildPythonPackage rec {
    pname = "bench-it";
    version = "1.0.1";
    src = fetchPypi {
      inherit pname version;
      sha256 = "0v6kfvgdnjlfmwlafmyjadgllfr8qc1hq83kz9q287gh5nvw851f";
    };
    postPatch = ''
      # Avoid building pypandoc
      sed -i 's|^import pypandoc.*||' setup.py
      sed -i 's|^description = pypandoc.*|description = ""|' setup.py
    '';
    doCheck = false;
  };

in buildPythonApplication rec {

  pname = "sqlfluff";
  url = "https://github.com/sqlfluff/sqlfluff";
  version = "0.4.1";

  src = fetchgit {
    inherit url;
    rev = version;
    sha256 = "0g53rhdg8b2p3xx9rmkc2fkqnz4fsrmkg98n5fi10s16wscn90kz";
  };

  propagatedBuildInputs = [
    appdirs
    bench-it
    cached-property
    click
    colorama
    configparser
    dataclasses
    diff_cover
    jinja2
    oyaml
    pathspec
    pluggy
    typing-extensions
  ];

  doCheck = false;

  meta = with stdenv.lib; {
    homepage = url;
    license = licenses.mit;
    platforms = platforms.linux;
    description = "A SQL linter and auto-formatter for Humans";
  };
}