Skip to content

Commit

Permalink
manga-tui: 0.3.1 -> 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
youwen5 committed Nov 2, 2024
1 parent fc43091 commit 2fe4540
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 3 deletions.
42 changes: 42 additions & 0 deletions pkgs/by-name/ma/manga-tui/0001-remove-failing-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From 3cb14a1b7b9d57d0492404f9db300eae1e24b34a Mon Sep 17 00:00:00 2001
From: Youwen Wu <[email protected]>
Date: Fri, 1 Nov 2024 23:33:54 -0700
Subject: [PATCH] remove failing test in nix

---
src/view/pages/manga.rs | 21 ---------------------
1 file changed, 21 deletions(-)

diff --git a/src/view/pages/manga.rs b/src/view/pages/manga.rs
index 119d9ea..7179a22 100644
--- a/src/view/pages/manga.rs
+++ b/src/view/pages/manga.rs
@@ -1853,25 +1853,4 @@ mod test {
assert_eq!(manga_page.bookmark_state.phase, BookmarkPhase::SearchingFromApi);
assert_eq!(expected, result)
}
-
- #[tokio::test]
- async fn it_sends_event_chapter_bookmarked_failed_to_fetch() {
- let (tx, _) = unbounded_channel();
- let mut manga_page = MangaPage::new(Manga::default(), None).with_global_sender(tx);
-
- flush_events(&mut manga_page);
-
- let api_client = TestApiClient::with_failing_response();
-
- manga_page.fetch_chapter_bookmarked(ChapterBookmarked::default(), api_client);
-
- let expected = MangaPageEvents::FetchBookmarkFailed;
-
- let result = timeout(Duration::from_millis(250), manga_page.local_event_rx.recv())
- .await
- .unwrap()
- .unwrap();
-
- assert_eq!(expected, result);
- }
}
--
2.46.1

17 changes: 14 additions & 3 deletions pkgs/by-name/ma/manga-tui/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
rustPlatform,
fetchFromGitHub,
pkg-config,
fetchpatch,
openssl,
sqlite,
stdenv,
darwin,
}:
let
version = "0.3.1";
version = "0.4.0";
in
rustPlatform.buildRustPackage {
pname = "manga-tui";
Expand All @@ -19,13 +20,23 @@ rustPlatform.buildRustPackage {
owner = "josueBarretogit";
repo = "manga-tui";
rev = "v${version}";
hash = "sha256-672AuQWviwihnUS3G0xSn4IAMHy0fPE1VLDfu8wrPGg=";
hash = "sha256-Se0f5jfYBmvemrYRKduDr1yT3fB2wfQP1fDpa/qrYlI=";
};

cargoHash = "sha256-yf0hISz/jHtrO1clTSIKfxFiwI+W0Mu3mY+XW6+ynJU=";
cargoHash = "sha256-IufJPCvUEWR5p4PrFlaiQPW9wyIFj/Pd/JHki69L6Es=";

nativeBuildInputs = [ pkg-config ];

patches = [
# fixes failing test <https://github.com/josueBarretogit/manga-tui/pull/56>
(fetchpatch {
url = "https://github.com/josueBarretogit/manga-tui/commit/4fa35b92fd2c56333c5968ecd17e668e1ae96f7b.patch";
hash = "sha256-3Kb19KxIfyG8KL5bw4UQw2owKQKzb4PrEEesYejmdzo=";
})
# removes a failing test
./0001-remove-failing-test.patch
];

buildInputs =
[
openssl
Expand Down

0 comments on commit 2fe4540

Please sign in to comment.