···25 testScript = { nodes, ... }: let
26 user = nodes.machine.config.users.users.alice;
27 in ''
0000028 with subtest("Wait for cage to boot up"):
29 start_all()
30 machine.wait_for_file("/run/user/${toString user.uid}/wayland-0.lock")
···25 testScript = { nodes, ... }: let
26 user = nodes.machine.config.users.users.alice;
27 in ''
28+ # Need to switch to a different VGA card / GPU driver because Cage segfaults with the default one (std):
29+ # machine # [ 14.355893] .cage-wrapped[736]: segfault at 20 ip 00007f035fa0d8c7 sp 00007ffce9e4a2f0 error 4 in libwlroots.so.8[7f035fa07000+5a000]
30+ # machine # [ 14.358108] Code: 4f a8 ff ff eb aa 0f 1f 44 00 00 c3 0f 1f 80 00 00 00 00 41 54 49 89 f4 55 31 ed 53 48 89 fb 48 8d 7f 18 48 8d 83 b8 00 00 00 <80> 7f 08 00 75 0d 48 83 3f 00 0f 85 91 00 00 00 48 89 fd 48 83 c7
31+ os.environ["QEMU_OPTS"] = "-vga virtio"
32+33 with subtest("Wait for cage to boot up"):
34 start_all()
35 machine.wait_for_file("/run/user/${toString user.uid}/wayland-0.lock")
···9, hunspell, libevent, libstartup_notification
10, libvpx_1_8
11, icu67, libpng, jemalloc, glib, pciutils
12-, autoconf213, which, gnused, rustPackages, rustPackages_1_45
13, rust-cbindgen, nodejs, nasm, fetchpatch
14, gnum4
15, debugBuild ? false
···90 then "/Applications/${binaryNameCapitalized}.app/Contents/MacOS"
91 else "/bin";
9293- # 78 ESR won't build with rustc 1.47
94- inherit (if lib.versionAtLeast ffversion "82" then rustPackages else rustPackages_1_45)
95- rustc cargo;
9697 # Darwin's stdenv provides the default llvmPackages version, match that since
98 # clang LTO on Darwin is broken so the stdenv is not being changed.
99- # Target the LLVM version that rustc -Vv reports it is built with for LTO.
100- # rustPackages_1_45 -> LLVM 10, rustPackages -> LLVM 11
101 llvmPackages = if stdenv.isDarwin
102 then buildPackages.llvmPackages
103- else if lib.versionAtLeast rustc.llvm.version "11"
104- then buildPackages.llvmPackages_11
105- else buildPackages.llvmPackages_10;
106107 # When LTO for Darwin is fixed, the following will need updating as lld
108 # doesn't work on it. For now it is fine since ltoSupport implies no Darwin.
···9, hunspell, libevent, libstartup_notification
10, libvpx_1_8
11, icu67, libpng, jemalloc, glib, pciutils
12+, autoconf213, which, gnused, rustPackages
13, rust-cbindgen, nodejs, nasm, fetchpatch
14, gnum4
15, debugBuild ? false
···90 then "/Applications/${binaryNameCapitalized}.app/Contents/MacOS"
91 else "/bin";
9293+ inherit (rustPackages) rustc cargo;
009495 # Darwin's stdenv provides the default llvmPackages version, match that since
96 # clang LTO on Darwin is broken so the stdenv is not being changed.
0097 llvmPackages = if stdenv.isDarwin
98 then buildPackages.llvmPackages
99+ else buildPackages.llvmPackages_11;
00100101 # When LTO for Darwin is fixed, the following will need updating as lld
102 # doesn't work on it. For now it is fine since ltoSupport implies no Darwin.
···1+{ rustPlatform
2+, fetchFromGitHub
3+, lib
4+, stdenv
5+, pkg-config
6+, postgresql
7+, sqlite
8+, openssl
9+, Security
10+, libiconv
11+}:
12+13+rustPlatform.buildRustPackage rec {
14+ pname = "movine";
15+ version = "0.11.0";
16+17+ src = fetchFromGitHub {
18+ owner = "byronwasti";
19+ repo = pname;
20+ rev = "v${version}";
21+ sha256 = "0rms8np8zd23xzrd5avhp2q1ndhdc8f49lfwpff9h0slw4rnzfnj";
22+ };
23+24+ cargoSha256 = "sha256-4ghfenwmauR4Ft9n7dvBflwIMXPdFq1vh6FpIegHnZk=";
25+26+ nativeBuildInputs = [ pkg-config ];
27+ buildInputs = [ postgresql sqlite ] ++ (
28+ if !stdenv.isDarwin then [ openssl ] else [ Security libiconv ]
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+}