chore: initial commit
This commit is contained in:
commit
99d82d207c
4 changed files with 117 additions and 0 deletions
2
.envrc
Normal file
2
.envrc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
nix_direnv_watch_file requirements.txt
|
||||||
|
use flake || use nix
|
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
.env
|
||||||
|
|
||||||
|
/.direnv
|
||||||
|
/result
|
56
flake.lock
Normal file
56
flake.lock
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
||||||
|
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
||||||
|
"revCount": 85,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/numtide/flake-utils/0.1.85%2Brev-f9e7cf818399d17d347f847525c5a5a8032e4e44/018a2375-3956-7f5c-9bbc-bd668014303a/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/numtide/flake-utils/0.1.85.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-M4VFpy7Av9j+33HF5nIGm0k2+DXXW4qSSKdidIKg5jY=",
|
||||||
|
"rev": "74e5bdc5478ebbe7ba5849f0d765f92757bb9dbf",
|
||||||
|
"revCount": 490387,
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2305.490387%2Brev-74e5bdc5478ebbe7ba5849f0d765f92757bb9dbf/018a32e8-728e-79be-b750-1e9bf72e5a50/source.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://flakehub.com/f/NixOS/nixpkgs/%2A.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
55
flake.nix
Normal file
55
flake.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{
|
||||||
|
description = "A comic strip downloader and archiver";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
|
||||||
|
flake-utils.url =
|
||||||
|
"https://flakehub.com/f/numtide/flake-utils/0.1.85.tar.gz";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||||
|
let pythonVersion = "python39";
|
||||||
|
in flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
lib = pkgs.lib;
|
||||||
|
python3Packages = pkgs.python3Packages;
|
||||||
|
fetchPypi = pkgs.fetchPypi;
|
||||||
|
in rec {
|
||||||
|
defaultPackage = python3Packages.buildPythonApplication rec {
|
||||||
|
pname = "dosage";
|
||||||
|
version = "3.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "sha256-mHV/U9Vqv7fSsLYNrCXckkJ1YpsccLd8HsJ78IwLX0Y=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeCheckInputs = with python3Packages; [
|
||||||
|
pytestCheckHook
|
||||||
|
pytest-xdist
|
||||||
|
responses
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = with python3Packages; [ setuptools-scm ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
colorama
|
||||||
|
imagesize
|
||||||
|
lxml
|
||||||
|
platformdirs
|
||||||
|
requests
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A comic strip downloader and archiver";
|
||||||
|
homepage = "https://dosage.rocks/";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ dmoonfire ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in a new issue