mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, fetchpatch
|
|
, git
|
|
, postgresqlTestHook
|
|
, postgresql
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "reshape";
|
|
version = "0.6.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fabianlindfors";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-iX8qhDk0PP0AB3bJ6ck8AZ9SCErFH416ggAkgK8O900=";
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
postgresqlTestHook
|
|
postgresql
|
|
];
|
|
|
|
dontUseCargoParallelTests = true;
|
|
|
|
postgresqlTestSetupPost = ''
|
|
export POSTGRES_CONNECTION_STRING="user=$PGUSER dbname=$PGDATABASE host=$PGHOST"
|
|
'';
|
|
|
|
postgresqlTestUserOptions = "LOGIN SUPERUSER";
|
|
|
|
# upstream doesn't ship a Cargo.lock, is generated by the update script
|
|
postPatch = ''
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
cargoHash = "sha256-UL/vP8055JRbbf5bqf0V3wGh+iF9ztVhyoMrtNs/c+4=";
|
|
|
|
meta = with lib; {
|
|
description = "An easy-to-use, zero-downtime schema migration tool for Postgres";
|
|
homepage = "https://github.com/fabianlindfors/reshape";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ilyakooo0 ];
|
|
};
|
|
}
|