1{ lib
2, rustPlatform
3, fetchCrate
4, postgresqlTestHook
5, postgresql
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "reshape";
10 version = "0.6.1";
11
12 src = fetchCrate {
13 inherit pname version;
14 hash = "sha256-pTEOVDeCE69dn005nj1ULGKjguCtC1uReI/l3WEz4+w=";
15 };
16
17 cargoHash = "sha256-KYU5drTVHdWmlE01Fq1TxJZTe87yBpDKIGm4P+RRCGw=";
18
19 nativeCheckInputs = [
20 postgresqlTestHook
21 postgresql
22 ];
23
24 dontUseCargoParallelTests = true;
25
26 postgresqlTestSetupPost = ''
27 export POSTGRES_CONNECTION_STRING="user=$PGUSER dbname=$PGDATABASE host=$PGHOST"
28 '';
29
30 postgresqlTestUserOptions = "LOGIN SUPERUSER";
31
32 meta = with lib; {
33 description = "An easy-to-use, zero-downtime schema migration tool for Postgres";
34 homepage = "https://github.com/fabianlindfors/reshape";
35 changelog = "https://github.com/fabianlindfors/reshape/releases/tag/v${version}";
36 license = licenses.mit;
37 maintainers = with maintainers; [ ilyakooo0 ];
38 };
39}