nixpkgs/pkgs/development/tools/reshape/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

2023-01-18 08:49:54 +00:00
{ lib
, rustPlatform
, fetchCrate
2024-03-26 22:30:43 +00:00
, darwin
2023-01-18 08:49:54 +00:00
, postgresqlTestHook
, postgresql
2024-03-26 22:30:43 +00:00
, stdenv
2023-01-18 08:49:54 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "reshape";
2024-01-22 04:09:34 +00:00
version = "0.7.0";
2023-01-18 08:49:54 +00:00
src = fetchCrate {
inherit pname version;
2024-01-22 04:09:34 +00:00
hash = "sha256-wv2gKyXCEH+tnZkUUAisMbuseth3dsFiJujH8VO1ii4=";
2023-01-18 08:49:54 +00:00
};
2024-01-22 04:09:34 +00:00
cargoHash = "sha256-VTJ3FNhVLgxo/VVBhk1yF9UUktLXcbrEkYwoyoWFhXA=";
2024-03-26 22:30:43 +00:00
buildInputs =
lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
2023-01-18 08:49:54 +00:00
nativeCheckInputs = [
postgresqlTestHook
postgresql
];
dontUseCargoParallelTests = true;
postgresqlTestSetupPost = ''
export POSTGRES_CONNECTION_STRING="user=$PGUSER dbname=$PGDATABASE host=$PGHOST"
'';
postgresqlTestUserOptions = "LOGIN SUPERUSER";
meta = with lib; {
description = "An easy-to-use, zero-downtime schema migration tool for Postgres";
mainProgram = "reshape";
2023-01-18 08:49:54 +00:00
homepage = "https://github.com/fabianlindfors/reshape";
changelog = "https://github.com/fabianlindfors/reshape/releases/tag/v${version}";
2023-01-18 08:49:54 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ilyakooo0 ];
};
}