2024-04-21 15:54:59 +00:00
|
|
|
{ lib, buildPythonApplication, fetchPypi, fetchpatch, requests, yt-dlp, pytestCheckHook }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
buildPythonApplication rec {
|
2022-10-30 15:09:59 +00:00
|
|
|
pname = "gallery-dl";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.26.9";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
src = fetchPypi {
|
2022-10-30 15:09:59 +00:00
|
|
|
inherit version;
|
|
|
|
pname = "gallery_dl";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-PgbfppyJCpgFupBQng8MUPihbDmit4C+xWnSzCJyu5k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# catch general Exceptions. Remove with the next release.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mikf/gallery-dl/commit/5227bb6b1d62ecef5b281592b0d001e7f9c101e3.patch";
|
|
|
|
hash = "sha256-rVsd764siP/07XBPVDnpxMm/4kLiH3fp9+NtpHHH23U=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
yt-dlp
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# requires network access
|
|
|
|
"--ignore=test/test_results.py"
|
2020-11-03 02:18:15 +00:00
|
|
|
"--ignore=test/test_downloader.py"
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
# incompatible with pytestCheckHook
|
|
|
|
"--ignore=test/test_ytdl.py"
|
2020-10-16 20:44:37 +00:00
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"gallery_dl"
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2020-11-30 08:33:03 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Command-line program to download image-galleries and -collections from several image hosting sites";
|
|
|
|
homepage = "https://github.com/mikf/gallery-dl";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/mikf/gallery-dl/blob/v${version}/CHANGELOG.md";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.gpl2Only;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "gallery-dl";
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ dawidsowa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|