Add adl module and packages
This commit is contained in:
parent
f4a0da4d87
commit
ddf772a4d8
|
@ -47,6 +47,7 @@
|
|||
vim.enable = true;
|
||||
};
|
||||
shell = {
|
||||
adl.enable = true;
|
||||
bitwarden.enable = true;
|
||||
direnv.enable = true;
|
||||
git.enable = true;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
};
|
||||
dev = {};
|
||||
shell = {
|
||||
adl.enable = true;
|
||||
bitwarden.enable = true;
|
||||
direnv.enable = true;
|
||||
git.enable = true;
|
||||
|
|
27
modules/shell/adl.nix
Normal file
27
modules/shell/adl.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
# modules/shell/adl.nix
|
||||
#
|
||||
# To maintain my filty weeb habits, I need tools. Tools that make it easy to
|
||||
# watch animu and track 'em on anilist. Laziness > my weebery.
|
||||
|
||||
{ options, config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
with lib.my;
|
||||
let cfg = config.modules.shell.adl;
|
||||
in {
|
||||
options.modules.shell.adl = {
|
||||
enable = mkBoolOpt false;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
user.packages = with pkgs; [
|
||||
# Dependencies
|
||||
my.trackma
|
||||
my.anime-downloader
|
||||
mpv
|
||||
|
||||
# The star of the show
|
||||
my.adl
|
||||
];
|
||||
};
|
||||
}
|
31
packages/adl.nix
Normal file
31
packages/adl.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchzip, my, ... }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "adl";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/RaitaroH/adl/archive/master.zip";
|
||||
sha256 = "HtKSPD3g0y68A37N4HhOIorW4sPyOr4ei9wABFh4GYc=";
|
||||
};
|
||||
|
||||
buildInputs = with my; [
|
||||
trackma
|
||||
anime-downloader
|
||||
];
|
||||
|
||||
phases = "installPhase";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/adl $out/bin/adl
|
||||
cp ${my.trackma}/bin/trackma $out/bin/trackma
|
||||
cp ${my.anime-downloader}/bin/anime $out/bin/anime
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/RaitaroH/adl";
|
||||
description = "popcorn anime-downloader + trackma wrapper";
|
||||
license = lib.licenses.gpl3;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
58
packages/anime-downloader.nix
Normal file
58
packages/anime-downloader.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ lib, python3, nodejs, aria2, coloredlogs }:
|
||||
|
||||
with python3.pkgs;
|
||||
let
|
||||
pySmartDL = buildPythonPackage rec {
|
||||
pname = "pySmartDL";
|
||||
version = "1.3.4";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "NSddFpTzR00zvcqTsn02CCZf/UL1rrKOVvOLkGwMNfQ=";
|
||||
};
|
||||
doCheck = false;
|
||||
};
|
||||
cfscrape = buildPythonPackage rec {
|
||||
pname = "cfscrape";
|
||||
version = "2.0.5";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "2VwWsGdxJ9+uPqUp82AdFHTK5+MlJ44dnYmipz7yH6k=";
|
||||
};
|
||||
buildInputs = [ requests ];
|
||||
doCheck = false;
|
||||
};
|
||||
in buildPythonApplication rec {
|
||||
pname = "anime-downloader";
|
||||
version = "5.0.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "BP4Wf2efU1RUk6I+82rFcvEdxDSKonTOIZjm3B0x7Eg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aria2
|
||||
nodejs
|
||||
beautifulsoup4
|
||||
cfscrape
|
||||
click
|
||||
coloredlogs
|
||||
fuzzywuzzy
|
||||
pySmartDL
|
||||
pycryptodome
|
||||
requests
|
||||
requests-cache
|
||||
setuptools
|
||||
tabulate
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/anime-dl/anime-downloader";
|
||||
description = "A simple but powerful anime downloader and streamer.";
|
||||
license = lib.licenses.unlicense;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
24
packages/trackma.nix
Normal file
24
packages/trackma.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ lib, python3 }:
|
||||
|
||||
with python3.pkgs;
|
||||
buildPythonApplication rec {
|
||||
pname = "Trackma";
|
||||
version = "0.8.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "9UHhxpbDcjW42JlefDHkTor1TdKmCQ1a1u0JS0Rt79k=";
|
||||
};
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "trackma" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/z411/trackma";
|
||||
description = "Open multi-site list manager for Unix-like systems. (ex-wMAL)";
|
||||
license = licenses.gpl3;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue