2024-03-11 01:05:55 +01:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aria2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook4
|
|
|
|
, desktop-file-utils
|
|
|
|
, libadwaita
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "varia";
|
2024-05-07 15:14:59 +02:00
|
|
|
version = "2024.5.7";
|
2024-03-11 01:05:55 +01:00
|
|
|
pyproject = false;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "giantpinkrobots";
|
|
|
|
repo = "varia";
|
|
|
|
rev = "v${version}";
|
2024-05-07 15:14:59 +02:00
|
|
|
hash = "sha256-axBBJYIFCt3J0aCY8tMYehho0QN1eIcUMPhWb5g5uDc=";
|
2024-03-11 01:05:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/varia-py.in \
|
|
|
|
--replace-fail 'aria2cexec = sys.argv[1]' 'aria2cexec = "${lib.getExe aria2}"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook4
|
|
|
|
desktop-file-utils
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libadwaita
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
pygobject3
|
|
|
|
aria2p
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/varia
|
|
|
|
mv $out/bin/varia-py.py $out/bin/varia
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple download manager based on aria2 and libadwaita";
|
|
|
|
homepage = "https://giantpinkrobots.github.io/varia";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
mainProgram = "varia";
|
|
|
|
maintainers = with maintainers; [ aleksana ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|