Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / database / surrealdb-migrations / default.nix
blob40d7614033281abfb1be9cee107dafa677e01fab
1 { lib
2 , stdenv
3 , rustPlatform
4 , fetchFromGitHub
5 , testers
6 , Security
7 , surrealdb-migrations
8 , nix-update-script
9 }:
11 let
12   pname = "surrealdb-migrations";
13   version = "1.0.0-preview.1";
15 rustPlatform.buildRustPackage rec {
16   inherit pname version;
18   src = fetchFromGitHub {
19     owner = "Odonno";
20     repo = pname;
21     rev = "v${version}";
22     hash = "sha256-G3pgUOAkLTcqUP8SLk2Tt38kuHD/2fDY5NLh0BTdNyk=";
23   };
25   cargoLock = {
26     lockFile = ./Cargo.lock;
27   };
29   buildInputs = [ ]
30     ++ lib.optionals stdenv.isDarwin [ Security ];
32    # Error: No such file or directory (os error 2)
33    # failures:
34    #   cli::apply::apply_initial_migrations
35    #   cli::apply::apply_initial_schema_changes
36    #   cli::apply::apply_new_migrations
37    #   cli::apply::apply_new_schema_changes
38    #   cli::apply::apply_should_skip_events_if_no_events_folder
39    #   cli::apply::apply_with_db_configuration
40    #   cli::apply::apply_with_skipped_migrations
41    #   cli::list::list_blog_migrations
42    #   cli::list::list_empty_migrations
43    #   library::list::list_blog_migrations
44    #   library::list::list_empty_migrations
45    #   library::up::apply_initial_migrations
46    #   library::up::apply_initial_schema_changes
47    #   library::up::apply_new_migrations
48    #   library::up::apply_new_schema_changes
49    #   library::up::apply_should_skip_events_if_no_events_folder
50    #   library::up_to::apply_with_skipped_migrations
51   doCheck = false;
53   passthru = {
54     updateScript = nix-update-script { };
55     tests.version = testers.testVersion {
56       package = surrealdb-migrations;
57       command = "surrealdb-migrations --version";
58     };
59   };
61   meta = with lib; {
62     description = "An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project.";
63     homepage = "https://crates.io/crates/surrealdb-migrations";
64     mainProgram = "surrealdb-migrations";
65     license = licenses.mit;
66     maintainers = with maintainers; [ happysalada ];
67   };