2023-02-02 18:25:31 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
2023-08-10 07:59:29 +00:00
|
|
|
, fetchCrate
|
2024-04-21 15:54:59 +00:00
|
|
|
, darwin
|
2023-02-02 18:25:31 +00:00
|
|
|
, postgresqlTestHook
|
|
|
|
, postgresql
|
2024-04-21 15:54:59 +00:00
|
|
|
, stdenv
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "reshape";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.7.0";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-wv2gKyXCEH+tnZkUUAisMbuseth3dsFiJujH8VO1ii4=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
cargoHash = "sha256-VTJ3FNhVLgxo/VVBhk1yF9UUktLXcbrEkYwoyoWFhXA=";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
buildInputs =
|
2024-09-26 11:04:55 +00:00
|
|
|
lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
postgresqlTestHook
|
|
|
|
postgresql
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCargoParallelTests = true;
|
|
|
|
|
|
|
|
postgresqlTestSetupPost = ''
|
|
|
|
export POSTGRES_CONNECTION_STRING="user=$PGUSER dbname=$PGDATABASE host=$PGHOST"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Easy-to-use, zero-downtime schema migration tool for Postgres";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "reshape";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://github.com/fabianlindfors/reshape";
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/fabianlindfors/reshape/releases/tag/v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ilyakooo0 ];
|
|
|
|
};
|
|
|
|
}
|