summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Kenji Okada <thiagokokada@gmail.com>2022-06-21 16:57:45 +0100
committerGitHub <noreply@github.com>2022-06-21 16:57:45 +0100
commitbb5ff13d3ebe2aa3b8a74add8ae39c432d51cf9d (patch)
tree31a785aaace941dca51b7ba93577706a41a1c75f
parentMerge pull request #178435 from NixOS/backport-176324-to-release-22.05 (diff)
parentanime-downloader: init at 5.0.14 (diff)
downloadnixpkgs-bb5ff13d3ebe2aa3b8a74add8ae39c432d51cf9d.tar.gz
Merge pull request #178432 from NixOS/backport-176331-to-release-22.05
[Backport release-22.05] anime-downloader: init at 5.0.14
-rw-r--r--pkgs/applications/video/anime-downloader/default.nix51
-rwxr-xr-xpkgs/applications/video/anime-downloader/update.sh8
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/applications/video/anime-downloader/default.nix b/pkgs/applications/video/anime-downloader/default.nix
new file mode 100644
index 000000000000..cf8edb33dd87
--- /dev/null
+++ b/pkgs/applications/video/anime-downloader/default.nix
@@ -0,0 +1,51 @@
+{ lib, python3, aria2, mpv, nodejs, fetchFromGitHub }:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "anime-downloader";
+ version = "5.0.14";
+
+ src = fetchFromGitHub {
+ owner = "anime-dl";
+ repo = "anime-downloader";
+ rev = version;
+ sha256 = "sha256-Uk2mtsSrb8fCD9JCFzvLBzMEB7ViVDrKPSOKy9ALJ6o=";
+ };
+
+ buildInputs = with python3.pkgs; [
+ jsbeautifier
+ pycryptodome
+ requests
+ ];
+
+ propagatedBuildInputs = [
+ aria2
+ mpv
+ nodejs
+ ] ++ (with python3.pkgs; [
+ beautifulsoup4
+ cfscrape
+ click
+ coloredlogs
+ fuzzywuzzy
+ pySmartDL
+ pyqt5
+ requests-cache
+ selenium
+ tabulate
+ ]);
+
+ doCheck = false;
+ # FIXME: checks must be disabled because they are lacking the qt env.
+ # They fail like this, even if built and wrapped with all Qt and runtime dependencies.
+ # Ref.: https://github.com/NixOS/nixpkgs/blob/634141959076a8ab69ca2cca0f266852256d79ee/pkgs/applications/misc/openlp/lib.nix#L20-L23
+
+ passthru.updateScript = ./update.sh;
+
+ meta = with lib; {
+ homepage = "https://github.com/anime-dl/anime-downloader";
+ description = "A simple but powerful anime downloader and streamer";
+ license = licenses.unlicense;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ WeebSorceress ];
+ };
+}
diff --git a/pkgs/applications/video/anime-downloader/update.sh b/pkgs/applications/video/anime-downloader/update.sh
new file mode 100755
index 000000000000..292299298ad9
--- /dev/null
+++ b/pkgs/applications/video/anime-downloader/update.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl jq common-updater-scripts
+
+set -eu -o pipefail
+
+version="$(curl --silent "https://api.github.com/repos/anime-dl/anime-downloader/releases" | jq '.[0].tag_name' --raw-output)"
+
+update-source-version anime-downloader "$version"
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index db90b6b80c89..98763ce27912 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -216,6 +216,8 @@ with pkgs;
ani-cli = callPackage ../applications/video/ani-cli { };
+ anime-downloader = callPackage ../applications/video/anime-downloader { };
+
aocd = with python3Packages; toPythonApplication aocd;
aesfix = callPackage ../tools/security/aesfix { };