depot/third_party/nixpkgs/pkgs/development/tools/squawk/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

54 lines
1.1 KiB
Nix

{ darwin
, fetchFromGitHub
, lib
, libiconv
, libpg_query
, openssl
, pkg-config
, rustPlatform
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "squawk";
version = "1.0.0";
src = fetchFromGitHub {
owner = "sbdchd";
repo = pname;
rev = "v${version}";
hash = "sha256-Uc357UspC2O/IxRRTy04jubzhKDRnIAN2CoHvbrGbHg=";
};
cargoHash = "sha256-G0t3wvcp1Dm0ZCDnzTVf1XJ2Dtr0LyrKM1Vvso0IoaA=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = lib.optionals (!stdenv.isDarwin) [
libiconv
openssl
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
CoreFoundation
Security
]);
OPENSSL_NO_VENDOR = 1;
LIBPG_QUERY_PATH = libpg_query;
checkFlags = [
# depends on the PostgreSQL version
"--skip=parse::tests::test_parse_sql_query_json"
];
meta = with lib; {
description = "Linter for PostgreSQL, focused on migrations";
homepage = "https://squawkhq.com/";
changelog = "https://github.com/sbdchd/squawk/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with lib.maintainers; [ andrewsmith ];
};
}