Unverified Commit d6429950 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #247548 from figsoda/reshape

reshape: refactor
parents 50071c61 bf76e795
Loading
Loading
Loading
Loading
+0 −1080

File deleted.

Preview size limit exceeded, changes collapsed.

+7 −18
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, fetchpatch
, git
, fetchCrate
, postgresqlTestHook
, postgresql
}:
@@ -12,13 +9,13 @@ rustPlatform.buildRustPackage rec {
  pname = "reshape";
  version = "0.6.1";

  src = fetchFromGitHub {
    owner = "fabianlindfors";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-iX8qhDk0PP0AB3bJ6ck8AZ9SCErFH416ggAkgK8O900=";
  src = fetchCrate {
    inherit pname version;
    hash = "sha256-pTEOVDeCE69dn005nj1ULGKjguCtC1uReI/l3WEz4+w=";
  };

  cargoHash = "sha256-KYU5drTVHdWmlE01Fq1TxJZTe87yBpDKIGm4P+RRCGw=";

  nativeCheckInputs = [
    postgresqlTestHook
    postgresql
@@ -32,18 +29,10 @@ rustPlatform.buildRustPackage rec {

  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";
    changelog = "https://github.com/fabianlindfors/reshape/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ilyakooo0 ];
  };