feat: initial commit

This commit is contained in:
D. Moonfire 2023-11-05 11:17:15 -06:00
commit 5902116fa6
4 changed files with 120 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake || use nix

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.env
/.direnv
/result

56
flake.lock Normal file
View 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-5nm4yrEHKupjn62MibENtfqlP6pWcRTuSKrMiH9bLkc=",
"rev": "5690c4271f2998c304a45c91a0aeb8fb69feaea7",
"revCount": 518598,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.518598%2Brev-5690c4271f2998c304a45c91a0aeb8fb69feaea7/018a32e8-6e96-7b90-bccc-a5cf4c5ac2dd/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.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
}

59
flake.nix Normal file
View file

@ -0,0 +1,59 @@
{
description = "A comic strip downloader and archiver (unstable)";
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.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;
src = pkgs.fetchFromGitHub {
owner = "webcomics";
repo = "dosage";
rev = "9163317abadcef0a562afaaf422828b56d006e20";
hash = "sha256-t5HxvXCFPNG5K1uDtfIxDo6JV921ywY1Eznj7GoSh44=";
};
in rec {
defaultPackage = python3Packages.buildPythonApplication rec {
pname = "dosage";
version = "3.1.dev104+g9e05fae304";
format = "pyproject";
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-xdist
responses
];
requirements = "${src}/setup/requirements.txt";
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;
});
}