nixpkgs/pkgs/tools/networking/motrix/default.nix

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

41 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, appimageTools
, fetchurl
}:
let
pname = "motrix";
2023-05-14 20:30:30 +02:00
version = "1.8.19";
src = fetchurl {
url = "https://github.com/agalwood/Motrix/releases/download/v${version}/Motrix-${version}.AppImage";
2023-05-14 20:30:30 +02:00
hash = "sha256-oSO+VH3bZcjnXjECqZgOmsvlOONbfgOq50qVLvHdKfo=";
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
};
in
2023-04-26 14:09:41 +02:00
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
2023-04-26 14:09:41 +02:00
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
2023-04-26 14:09:41 +02:00
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "A full-featured download manager";
homepage = "https://motrix.app";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
2023-04-26 14:09:41 +02:00
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ dit7ya ];
2024-02-11 03:19:15 +01:00
mainProgram = "motrix";
};
}