mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
8b89e2b819
Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: zendo <linzway@qq.com> Resolves https://github.com/NixOS/nixpkgs/issues/157984
37 lines
1000 B
Nix
37 lines
1000 B
Nix
{ lib
|
|
, appimageTools
|
|
, fetchurl
|
|
}:
|
|
let
|
|
pname = "motrix";
|
|
version = "1.6.11";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/agalwood/Motrix/releases/download/v${version}/Motrix-${version}.AppImage";
|
|
sha256 = "sha256-tE2Q7NM+cQOg+vyqyfRwg05EOMQWhhggTA6S+VT+SkM=";
|
|
};
|
|
|
|
appimageContents = appimageTools.extractType2 {
|
|
inherit pname version src;
|
|
};
|
|
in
|
|
appimageTools.wrapType2 rec {
|
|
inherit pname version src;
|
|
|
|
extraInstallCommands = ''
|
|
mv $out/bin/${pname}-${version} $out/bin/${pname}
|
|
install -m 444 -D ${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" ];
|
|
maintainers = with maintainers; [ dit7ya ];
|
|
};
|
|
}
|