about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/database/surrealdb-migrations/default.nix
blob: 2adc3133839fdab08ccca365265f647658d52b5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, testers
, Security
, surrealdb-migrations
, nix-update-script
}:

let
  pname = "surrealdb-migrations";
  version = "1.0.1";
in
rustPlatform.buildRustPackage rec {
  inherit pname version;

  src = fetchFromGitHub {
    owner = "Odonno";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-yody0F8Wkizyq7SW9OjT4cV3O9HOUYlBc7+8GwJG2cs=";
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
  };

  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 ];
  };
}