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