1{ lib
2, rustPlatform
3, fetchCrate
4, pkg-config
5, openssl
6, stdenv
7, darwin
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "movine";
12 version = "0.11.4";
13
14 src = fetchCrate {
15 inherit pname version;
16 hash = "sha256-wa2GfV2Y8oX8G+1LbWnb2KH/+QbUYL9GXgOOVHpzbN8=";
17 };
18
19 cargoHash = "sha256-brM6QObhl9W5SZ+79Kv9oNxnglO24BUgjPSQy9jV1/Q=";
20
21 nativeBuildInputs = [
22 pkg-config
23 ];
24
25 buildInputs = [
26 openssl
27 ] ++ lib.optionals stdenv.isDarwin [
28 darwin.apple_sdk.frameworks.Security
29 ];
30
31 meta = with lib; {
32 description = "A migration manager written in Rust, that attempts to be smart yet minimal";
33 homepage = "https://github.com/byronwasti/movine";
34 license = licenses.mit;
35 longDescription = ''
36 Movine is a simple database migration manager that aims to be compatible
37 with real-world migration work. Many migration managers get confused
38 with complicated development strategies for migrations. Oftentimes
39 migration managers do not warn you if the SQL saved in git differs from
40 what was actually run on the database. Movine solves this issue by
41 keeping track of the unique hashes for the <literal>up.sql</literal> and
42 <literal>down.sql</literal> for each migration, and provides tools for
43 fixing issues. This allows users to easily keep track of whether their
44 local migration history matches the one on the database.
45
46 This project is currently in early stages.
47
48 Movine does not aim to be an ORM.
49 Consider <link xling:href="https://diesel.rs/">diesel</link> instead if
50 you want an ORM.
51 '';
52 maintainers = with maintainers; [ netcrns ];
53 };
54}