depot/third_party/nixpkgs/pkgs/tools/networking/motrix/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

39 lines
1 KiB
Nix

{ lib
, appimageTools
, fetchurl
}:
let
pname = "motrix";
version = "1.8.19";
src = fetchurl {
url = "https://github.com/agalwood/Motrix/releases/download/v${version}/Motrix-${version}.AppImage";
hash = "sha256-oSO+VH3bZcjnXjECqZgOmsvlOONbfgOq50qVLvHdKfo=";
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
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" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ dit7ya ];
};
}