lol
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "sqlcheck";
11 version = "1.3";
12
13 src = fetchFromGitHub {
14 owner = "jarulraj";
15 repo = "sqlcheck";
16 tag = "v${version}";
17 hash = "sha256-rGqCtEO2K+OT44nYU93mF1bJ07id+ixPkRSC8DcO6rY=";
18 fetchSubmodules = true;
19 };
20
21 patches = [
22 # Fix gcc-13 build failure:
23 # https://github.com/jarulraj/sqlcheck/pull/62
24 (fetchpatch {
25 name = "gcc-13.patch";
26 url = "https://github.com/jarulraj/sqlcheck/commit/ca131db13b860cf1d9194a1c7f7112f28f49acca.patch";
27 hash = "sha256-uoF7rYvjdIUu82JCLXq/UGswgwM6JCpmABP4ItWjDe4=";
28 })
29 ];
30
31 nativeBuildInputs = [ cmake ];
32
33 doCheck = true;
34
35 meta = with lib; {
36 inherit (src.meta) homepage;
37 description = "Automatically identify anti-patterns in SQL queries";
38 mainProgram = "sqlcheck";
39 license = licenses.asl20;
40 platforms = platforms.all;
41 maintainers = [ ];
42 };
43}