2024-10-19 20:30:32 +08:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchurl,
|
|
|
|
appimageTools,
|
2025-04-15 23:58:33 +02:00
|
|
|
webkitgtk_4_1,
|
2024-10-19 20:30:32 +08:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
pname = "bitcomet";
|
2025-01-16 03:39:27 +00:00
|
|
|
version = "2.12.1";
|
2024-10-19 20:30:32 +08:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.bitcomet.com/linux/x86_64/BitComet-${version}-x86_64.AppImage";
|
2025-01-16 03:39:27 +00:00
|
|
|
hash = "sha256-iaUPf9gSTd2m641Ja9/5v4wkO3H4+R08YXohLCeFuTQ=";
|
2024-10-19 20:30:32 +08:00
|
|
|
};
|
|
|
|
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
|
|
|
in
|
|
|
|
appimageTools.wrapType2 {
|
|
|
|
inherit pname version src;
|
|
|
|
|
|
|
|
extraPkgs =
|
|
|
|
pkgs: with pkgs; [
|
|
|
|
libxml2
|
|
|
|
libpng
|
2025-04-15 23:58:33 +02:00
|
|
|
webkitgtk_4_1
|
2024-10-19 20:30:32 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
mkdir -p $out/share/applications
|
|
|
|
install -m 444 ${appimageContents}/com.bitcomet.linux.desktop $out/share/applications/bitcomet.desktop
|
|
|
|
substituteInPlace $out/share/applications/bitcomet.desktop \
|
|
|
|
--replace-fail 'Exec=usr/bin/BitComet' 'Exec=bitcomet'
|
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.bitcomet.com";
|
|
|
|
description = "Free BitTorrent download client";
|
|
|
|
mainProgram = "bitcomet";
|
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = lib.licenses.unfree;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
2025-01-26 02:27:10 +08:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2024-10-19 20:30:32 +08:00
|
|
|
};
|
|
|
|
}
|