2021-08-11 09:55:36 +02:00
|
|
|
{ lib
|
2023-12-30 04:22:06 +01:00
|
|
|
, stdenv
|
2022-02-15 08:18:02 +01:00
|
|
|
, python3
|
2023-05-21 23:36:06 +02:00
|
|
|
, fetchFromGitHub
|
2023-05-25 16:07:31 +02:00
|
|
|
, fetchPypi
|
2023-12-30 04:22:06 +01:00
|
|
|
, curl
|
|
|
|
, wget
|
|
|
|
, git
|
|
|
|
, ripgrep
|
|
|
|
, postlight-parser
|
|
|
|
, readability-extractor
|
|
|
|
, chromium
|
|
|
|
, yt-dlp
|
2021-08-11 09:55:36 +02:00
|
|
|
}:
|
|
|
|
|
2021-08-11 11:49:16 +02:00
|
|
|
let
|
2022-02-15 08:18:02 +01:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
django = super.django_3.overridePythonAttrs (old: rec {
|
2022-06-12 06:40:02 +02:00
|
|
|
version = "3.1.14";
|
2022-02-15 08:18:02 +01:00
|
|
|
src = old.src.override {
|
|
|
|
inherit version;
|
2022-08-15 21:22:53 +02:00
|
|
|
hash = "sha256-cqSloTaiFMOc8BbM3Wtp4qoIx0ecZtk/OpteS7nYo0c=";
|
2022-02-15 08:18:02 +01:00
|
|
|
};
|
2022-06-12 06:43:20 +02:00
|
|
|
meta = old.meta // {
|
|
|
|
knownVulnerabilities = [
|
|
|
|
"CVE-2021-45115"
|
|
|
|
"CVE-2021-45116"
|
|
|
|
"CVE-2021-45452"
|
|
|
|
"CVE-2022-23833"
|
|
|
|
"CVE-2022-22818"
|
|
|
|
"CVE-2022-28347"
|
|
|
|
"CVE-2022-28346"
|
|
|
|
];
|
|
|
|
};
|
2022-02-15 08:18:02 +01:00
|
|
|
});
|
2023-05-21 23:36:06 +02:00
|
|
|
django-extensions = super.django-extensions.overridePythonAttrs (old: rec {
|
|
|
|
version = "3.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
inherit version;
|
|
|
|
owner = "django-extensions";
|
|
|
|
repo = "django-extensions";
|
|
|
|
rev = "e43f383dae3a35237e42f6acfe1207a8e7e7bdf5";
|
|
|
|
hash = "sha256-NAMa78KhAuoJfp0Cb0Codz84sRfRQ1JhSLNYRI4GBPM=";
|
|
|
|
};
|
2023-12-30 04:22:06 +01:00
|
|
|
# possibly a real issue, but that version is not supported anymore
|
|
|
|
disabledTests = [ "test_should_highlight_bash_syntax_without_name" ];
|
2023-05-21 23:36:06 +02:00
|
|
|
});
|
2021-08-11 11:49:16 +02:00
|
|
|
};
|
2022-02-15 08:18:02 +01:00
|
|
|
};
|
2021-08-11 11:49:16 +02:00
|
|
|
in
|
|
|
|
|
2022-02-15 08:18:02 +01:00
|
|
|
python.pkgs.buildPythonApplication rec {
|
2021-08-11 09:55:36 +02:00
|
|
|
pname = "archivebox";
|
2023-12-30 04:22:06 +01:00
|
|
|
version = "0.7.2";
|
|
|
|
pyproject = true;
|
2021-08-11 09:55:36 +02:00
|
|
|
|
2023-05-25 16:07:31 +02:00
|
|
|
src = fetchPypi {
|
2021-08-11 09:55:36 +02:00
|
|
|
inherit pname version;
|
2023-12-30 04:22:06 +01:00
|
|
|
hash = "sha256-hdBUEX2tOWN2b11w6aG3x7MP7KQTj4Rwc2w8XvABGf4=";
|
2021-08-11 09:55:36 +02:00
|
|
|
};
|
|
|
|
|
2023-12-30 04:22:06 +01:00
|
|
|
nativeBuildInputs = with python.pkgs; [
|
|
|
|
pdm-backend
|
|
|
|
];
|
|
|
|
|
2022-02-15 08:18:02 +01:00
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
2023-12-30 04:22:06 +01:00
|
|
|
croniter
|
|
|
|
dateparser
|
2022-02-15 08:18:02 +01:00
|
|
|
django
|
2022-01-09 16:24:52 +01:00
|
|
|
django-extensions
|
2023-12-30 04:22:06 +01:00
|
|
|
ipython
|
|
|
|
mypy-extensions
|
2021-08-11 09:55:36 +02:00
|
|
|
python-crontab
|
2023-12-30 04:22:06 +01:00
|
|
|
requests
|
2021-08-11 09:55:36 +02:00
|
|
|
w3lib
|
2023-12-30 04:22:06 +01:00
|
|
|
yt-dlp
|
2023-12-26 12:10:16 +01:00
|
|
|
];
|
|
|
|
|
2023-12-30 04:22:06 +01:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--set USE_NODE True" # used through dependencies, not needed explicitly
|
|
|
|
"--set READABILITY_BINARY ${lib.meta.getExe readability-extractor}"
|
|
|
|
"--set MERCURY_BINARY ${lib.meta.getExe postlight-parser}"
|
|
|
|
"--set CURL_BINARY ${lib.meta.getExe curl}"
|
|
|
|
"--set RIPGREP_BINARY ${lib.meta.getExe ripgrep}"
|
|
|
|
"--set WGET_BINARY ${lib.meta.getExe wget}"
|
|
|
|
"--set GIT_BINARY ${lib.meta.getExe git}"
|
|
|
|
"--set YOUTUBEDL_BINARY ${lib.meta.getExe yt-dlp}"
|
|
|
|
] ++ (if (lib.meta.availableOn stdenv.hostPlatform chromium) then [
|
|
|
|
"--set CHROME_BINARY ${chromium}/bin/chromium-browser"
|
|
|
|
] else [
|
|
|
|
"--set-default USE_CHROME False"
|
|
|
|
]);
|
|
|
|
|
2021-08-11 09:55:36 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Open source self-hosted web archiving";
|
|
|
|
homepage = "https://archivebox.io";
|
|
|
|
license = licenses.mit;
|
2023-12-30 04:22:06 +01:00
|
|
|
maintainers = with maintainers; [ siraben viraptor ];
|
2021-08-11 09:55:36 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|