Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

90 lines
2.8 KiB
Nix
Raw Permalink Normal View History

2024-12-04 02:33:06 +08:00
{
lib,
2025-06-24 04:44:58 +08:00
flutter329,
2025-05-04 14:51:22 +08:00
fetchFromGitHub,
autoPatchelfHook,
2024-12-04 02:33:06 +08:00
webkitgtk_4_1,
2025-05-04 14:51:22 +08:00
glib-networking,
2025-02-15 18:22:00 +00:00
runCommand,
yq,
jhentai,
_experimental-update-script-combinators,
gitUpdater,
2024-12-04 02:33:06 +08:00
}:
2025-02-15 18:24:11 +00:00
2025-06-24 04:44:58 +08:00
flutter329.buildFlutterApplication rec {
2024-12-04 02:33:06 +08:00
pname = "jhentai";
2025-07-25 06:47:21 +00:00
version = "8.0.9";
2024-12-04 02:33:06 +08:00
src = fetchFromGitHub {
owner = "jiangtian616";
repo = "JHenTai";
tag = "v${version}";
2025-07-25 06:47:21 +00:00
hash = "sha256-Yclj0oJ35iuqopRgJRgmi5r/WSNfT4080WW99nvnO/0=";
2024-12-04 02:33:06 +08:00
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
desktop_webview_window = "sha256-QDlumlZ3pbmBRkMSJJVgz8HcCdANzV3cU142URvkY1w=";
dio = "sha256-eHGAV/yIqTaC/wJeSXiPwonPePq+GT1u1dgjbBrW8OI=";
flutter_draggable_gridview = "sha256-kntjeWEhRl4rdJBO8kt7GCaaLdPWy6b7zmBIjHyP7h8=";
flutter_slidable = "sha256-nBPEZBvKV3D/eEa/cYb7jgbJ60rbh823yDJALLz1/8c=";
flutter_socks_proxy = "sha256-a8XZTPTz521o7G7NsEXv2E/H7uVJcY4rcouIkdQC+jg=";
2025-02-15 19:26:26 +00:00
j_downloader = "sha256-Ct4TZvxKVWirEnSLs+pekDuf+b8tHFUZTdupBflGvJM=";
2024-12-04 02:33:06 +08:00
like_button = "sha256-OVzfpIEnw88496H345NHn7nZ48+QDTaneBzN2UCdwk8=";
photo_view = "sha256-k/+ncCzGkF4XmFpo3wmJOQbElSh2r+SlyeI3M9yDFtM=";
2025-02-15 19:26:26 +00:00
fluttertoast = "sha256-/2VJ1x7l5Idjwkm4Ennz8H/EC3j4/slRODj/82yO3iI=";
2025-05-04 14:51:22 +08:00
http_proxy = "sha256-/udhj2Tyc7PEtL6eU4TWIdrz/7Uh7D26jDSDxTr3X+I=";
2025-02-15 19:26:26 +00:00
scrollable_positioned_list = "sha256-8WfyUpTs+Cfv2VzFECrW/DGoKOsu9KY6hf6sP81xuBg=";
2025-05-04 14:51:22 +08:00
system_network_proxy = "sha256-boPbPO0Xs86Yu4OJmBr/nXGfX/vtZwosP6vRN4g3FQA=";
2025-02-15 19:26:26 +00:00
zoom_view = "sha256-/JPvmLg8syn5IlKucj3R765kedCZ1LdzkreUIsvdwEg=";
2025-05-04 14:51:22 +08:00
receive_sharing_intent = "sha256-8D5ZENARPZ7FGrdIErxOoV3Ao35/XoQ2tleegI42ZUY=";
2024-12-04 02:33:06 +08:00
};
2025-02-15 18:24:11 +00:00
nativeBuildInputs = [ autoPatchelfHook ];
2025-05-04 14:51:22 +08:00
buildInputs = [
webkitgtk_4_1
glib-networking
];
2025-02-15 18:24:11 +00:00
2024-12-04 02:33:06 +08:00
flutterBuildFlags = [
"--target lib/src/main.dart"
];
postInstall = ''
2025-02-15 18:24:11 +00:00
install -Dm644 linux/assets/top.jtmonster.jhentai.desktop $out/share/applications/jhentai.desktop
install -Dm644 assets/icon/JHenTai_512.png $out/share/icons/hicolor/512x512/apps/top.jtmonster.jhentai.png
2024-12-04 02:33:06 +08:00
'';
extraWrapProgramArgs = ''
2025-02-15 18:24:11 +00:00
--prefix LD_LIBRARY_PATH : $out/app/jhentai/lib
2024-12-04 02:33:06 +08:00
'';
2025-02-15 18:22:00 +00:00
passthru = {
pubspecSource =
runCommand "pubspec.lock.json"
{
buildInputs = [ yq ];
inherit (jhentai) src;
}
''
cat $src/pubspec.lock | yq > $out
'';
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { rev-prefix = "v"; })
(_experimental-update-script-combinators.copyAttrOutputToFile "jhentai.pubspecSource" ./pubspec.lock.json)
];
};
2024-12-04 02:33:06 +08:00
meta = {
description = "Cross-platform manga app made for e-hentai & exhentai by Flutter";
homepage = "https://github.com/jiangtian616/JHenTai";
mainProgram = "jhentai";
license = with lib.licenses; [ asl20 ];
2025-01-26 02:27:12 +08:00
maintainers = with lib.maintainers; [ ];
2024-12-04 02:33:06 +08:00
platforms = lib.platforms.linux;
};
}