migrated download, tasks and webcomix

This commit is contained in:
Danilo Reyes 2024-12-14 14:18:18 -06:00
parent 4952408d25
commit a325009332
5 changed files with 8 additions and 97 deletions

8
flake.lock generated
View File

@ -370,11 +370,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1733601842,
"narHash": "sha256-x5BNIZiab7oPF8CoNNnQfb9gI5e3oF/W9CHSeGldMZg=",
"lastModified": 1734206930,
"narHash": "sha256-ejmbFHBqv3LizAZX2IALcgQtjjcrvCMmN8UHx/fqnaQ=",
"ref": "refs/heads/master",
"rev": "85bab827537d03c887c733d20ace7c0155269e72",
"revCount": 33,
"rev": "c12e26ae7dad1a1ef5ea08f42ab03b9586af22e3",
"revCount": 36,
"type": "git",
"url": "ssh://git@gitlab.com/CaptainJawZ/scripts-flake.git"
},

View File

@ -1,4 +1,5 @@
{
inputs,
pkgs,
lib,
config,
@ -12,7 +13,7 @@
};
config =
let
download = pkgs.callPackage ../../pkgs/download/default.nix { };
download = inputs.jawz-scripts.packages.x86_64-linux.download;
in
{
home-manager.users.jawz = {

View File

@ -1,4 +1,4 @@
{ pkgs, lib, ... }:
{ inputs, lib, ... }:
{
imports = [ ./base.nix ];
config.my.scripts.tasks = {
@ -8,6 +8,6 @@
name = "tasks";
timer = "*:0/10";
description = "Runs a bunch of organizing tasks on selected directories";
package = pkgs.writeScriptBin "tasks" (builtins.readFile ../../scripts/tasks.sh);
package = inputs.jawz-scripts.packages.x86_64-linux.tasks;
};
}

View File

@ -1,37 +0,0 @@
{
python3Packages,
gallery-dl,
ffmpeg,
callPackage,
...
}:
let
pname = "download";
version = "2.5";
in
python3Packages.buildPythonApplication {
inherit pname version;
src = builtins.path {
path = ../../scripts/download/.;
name = "${pname}-${version}";
};
pyproject = true;
build-system = [ python3Packages.setuptools ];
dependencies =
[
ffmpeg
gallery-dl
(callPackage ../../pkgs/webcomix/default.nix { })
]
++ builtins.attrValues {
inherit (python3Packages)
pyyaml
types-pyyaml
yt-dlp
;
};
}

View File

@ -1,53 +0,0 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "webcomix";
version = "3.11.0";
pyproject = true;
src = fetchFromGitHub {
owner = "J-CPelletier";
repo = "webcomix";
rev = version;
hash = "sha256-Y16+/9TnECMkppgI/BeAbTLWt0M4V/xn1+hM4ILp/+g=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "poetry>=1.2.0" poetry-core \
--replace-fail "poetry.masonry.api" "poetry.core.masonry.api" \
--replace-fail 'pytest-rerunfailures = "^11.1.2"' 'pytest-rerunfailures = "14.0"'
'';
build-system = [
python3Packages.poetry-core
];
dependencies = with python3Packages; [
click
tqdm
scrapy
scrapy-splash
scrapy-fake-useragent
pytest-rerunfailures
docker
];
preCheck = ''
export HOME=$(mktemp -d)
'';
doCheck = false;
meta = {
description = "Webcomic downloader";
homepage = "https://github.com/J-CPelletier/webcomix";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ CaptainJawZ ];
mainProgram = "webcomix";
};
}