diff options
author | happysalada <raphael@megzari.com> | 2023-05-09 20:00:53 -0400 |
---|---|---|
committer | Yt <happysalada@tuta.io> | 2023-05-09 20:29:49 -0400 |
commit | a78d428a63ae82401dbf86b98c9478b429a934f3 (patch) | |
tree | 0d08a2ae59632279126d9b862354af59f42f55d2 /pkgs/development/tools/database | |
parent | af7e39841a8e12b75d427cb496e413f8152023ce (diff) |
surrealdb-migrations: init at 0.9.5
Diffstat (limited to 'pkgs/development/tools/database')
-rw-r--r-- | pkgs/development/tools/database/surrealdb-migrations/default.nix | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/development/tools/database/surrealdb-migrations/default.nix b/pkgs/development/tools/database/surrealdb-migrations/default.nix new file mode 100644 index 0000000000000..79711bc2a2d57 --- /dev/null +++ b/pkgs/development/tools/database/surrealdb-migrations/default.nix @@ -0,0 +1,73 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, testers +, Security +, surrealdb-migrations +, nix-update-script +}: + +let + pname = "surrealdb-migrations"; + version = "0.9.5"; +in +rustPlatform.buildRustPackage rec { + inherit pname version; + + src = fetchFromGitHub { + owner = "Odonno"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-raDWqdOid4WSl6Ads8dmh7KI6NMWZrSwGfh+wbd/Vao="; + }; + + cargoSha256 = "sha256-1+cvOhDeH9vx/8J1RwKLPdkBmqBKFmbNXv3H44pZfj0="; + + + # nativeBuildInputs = [ + # pkg-config + # # needed on top of LIBCLANG_PATH to compile rquickjs + # llvmPackages.clang + # ]; + + 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; { + description = "An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project."; + homepage = "https://crates.io/crates/surrealdb-migrations"; + mainProgram = "surrealdb-migrations"; + license = licenses.mit; + maintainers = with maintainers; [ happysalada ]; + }; +} |