Skip to content

Commit

Permalink
motrix: init at 1.6.11 (NixOS#185804)
Browse files Browse the repository at this point in the history
Co-authored-by: Sandro <[email protected]>
Co-authored-by: zendo <[email protected]>
Resolves NixOS#157984
  • Loading branch information
dit7ya authored Nov 29, 2022
1 parent 569f076 commit 8b89e2b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pkgs/tools/networking/motrix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ 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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9412,6 +9412,8 @@ with pkgs;

mosh = callPackage ../tools/networking/mosh { };

motrix = callPackage ../tools/networking/motrix { };

mpage = callPackage ../tools/text/mpage { };

mprime = callPackage ../tools/misc/mprime { };
Expand Down

0 comments on commit 8b89e2b

Please sign in to comment.