depot/third_party/nixpkgs/pkgs/development/tools/squawk/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

49 lines
1 KiB
Nix

{ darwin
, fetchFromGitHub
, lib
, libiconv
, libpg_query
, openssl
, pkg-config
, rustPlatform
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "squawk";
version = "0.24.2";
src = fetchFromGitHub {
owner = "sbdchd";
repo = pname;
rev = "v${version}";
hash = "sha256-gFJaW7Mb3HKN6D/qnpfNQVxBOKbxIBZOVWJ63wiGoeU=";
};
cargoHash = "sha256-a1kAVIyGnVF3IWkDQbmV3L9cfY+1564RW6eWfBHbTZ8=";
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;
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 marsam ];
};
}