mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
55 lines
1.2 KiB
Nix
55 lines
1.2 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.hostPlatform.isDarwin) [
|
|
libiconv
|
|
openssl
|
|
] ++ lib.optionals stdenv.hostPlatform.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 ];
|
|
};
|
|
}
|