2023-02-16 17:41:37 +00:00
|
|
|
{ darwin
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, libiconv
|
|
|
|
, libpg_query
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
}:
|
2023-03-27 19:17:25 +00:00
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "squawk";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.24.0";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sbdchd";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-eic5j/mD4PBCMcATTSTJSKazZFJOxQuW7NyiYPjKCcM=";
|
2023-02-16 17:41:37 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
cargoHash = "sha256-kzb00W9IlshhiV+vUIOlO6BnprHr2XPf8P207WYFP5I=";
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.bindgenHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals (!stdenv.isDarwin) [
|
|
|
|
libiconv
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
|
|
|
CoreFoundation
|
|
|
|
Security
|
|
|
|
]);
|
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
LIBPG_QUERY_PATH = libpg_query;
|
2023-02-16 17:41:37 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|