nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 51 lines 1.4 kB view raw
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 postPatch = '' 32 substituteInPlace CMakeLists.txt \ 33 --replace-fail "cmake_minimum_required(VERSION 2.8 FATAL_ERROR)" "cmake_minimum_required(VERSION 3.10)" 34 substituteInPlace external/gflags/CMakeLists.txt \ 35 --replace-fail "cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)" "cmake_minimum_required(VERSION 3.10)" 36 ''; 37 38 nativeBuildInputs = [ cmake ]; 39 40 doCheck = true; 41 42 meta = { 43 inherit (src.meta) homepage; 44 description = "Automatically identify anti-patterns in SQL queries"; 45 mainProgram = "sqlcheck"; 46 license = lib.licenses.asl20; 47 platforms = with lib.platforms; unix ++ windows; 48 broken = stdenv.hostPlatform.isDarwin; 49 maintainers = with lib.maintainers; [ h7x4 ]; 50 }; 51}