2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, testers
|
|
|
|
, Security
|
|
|
|
, surrealdb-migrations
|
|
|
|
, nix-update-script
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "surrealdb-migrations";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.0.0-preview.3";
|
2023-05-24 13:37:59 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Odonno";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-BSLUhXxZyffH6HX3RR6PqXts76ERa0bpct/qs0Sf0NE=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-jj1ytX44XoNKR+TCn/MpWk8CFM/DvHSwyfjVe3ca+AA=";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
buildInputs = [ ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
|
|
|
# Error: No such file or directory (os error 2)
|
|
|
|
# failures:
|
|
|
|
# cli::apply::apply_initial_migrations
|
|
|
|
# cli::apply::apply_initial_schema_changes
|
|
|
|
# cli::apply::apply_new_migrations
|
|
|
|
# cli::apply::apply_new_schema_changes
|
|
|
|
# cli::apply::apply_should_skip_events_if_no_events_folder
|
|
|
|
# cli::apply::apply_with_db_configuration
|
|
|
|
# cli::apply::apply_with_skipped_migrations
|
|
|
|
# cli::list::list_blog_migrations
|
|
|
|
# cli::list::list_empty_migrations
|
|
|
|
# library::list::list_blog_migrations
|
|
|
|
# library::list::list_empty_migrations
|
|
|
|
# library::up::apply_initial_migrations
|
|
|
|
# library::up::apply_initial_schema_changes
|
|
|
|
# library::up::apply_new_migrations
|
|
|
|
# library::up::apply_new_schema_changes
|
|
|
|
# library::up::apply_should_skip_events_if_no_events_folder
|
|
|
|
# library::up_to::apply_with_skipped_migrations
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script { };
|
|
|
|
tests.version = testers.testVersion {
|
|
|
|
package = surrealdb-migrations;
|
|
|
|
command = "surrealdb-migrations --version";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "https://crates.io/crates/surrealdb-migrations";
|
|
|
|
mainProgram = "surrealdb-migrations";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
};
|
|
|
|
}
|