66 lines
1.7 KiB
Nix
66 lines
1.7 KiB
Nix
{
|
|
description = "DLSite download organizer";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { self, nixpkgs }: let
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-linux";
|
|
};
|
|
in {
|
|
packages.x86_64-linux = with pkgs.python3Packages; rec {
|
|
lxml5 = buildPythonPackage rec {
|
|
pname = "lxml";
|
|
version = "5.0.1";
|
|
format = "setuptools";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "refs/tags/lxml-${version}";
|
|
hash = "sha256-RAh93UJiBcRxXSARJvD3o91i+MdelwlaCEK2aVu0joc=";
|
|
};
|
|
nativeBuildInputs = with pkgs; [ libxml2.dev libxslt.dev cython_3 ];
|
|
buildInputs = with pkgs; [ libxml2 libxslt zlib ];
|
|
|
|
# tests are meant to be ran "in-place" in the same directory as src
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "lxml" "lxml.etree" ];
|
|
};
|
|
|
|
dlsite-async = buildPythonPackage rec {
|
|
pname = "dlsite_async";
|
|
version = "0.3.0";
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-cUhH7eNIoQUKt0nUl+wSGFGbZpKmtwPWyVR2PTJI1co=";
|
|
};
|
|
pyproject = true;
|
|
nativeBuildInputs = [ pkgs.pdm ];
|
|
propagatedBuildInputs = [
|
|
lxml5
|
|
aiohttp
|
|
beautifulsoup4
|
|
pdm-backend
|
|
];
|
|
};
|
|
|
|
dlibrary = buildPythonApplication {
|
|
pname = "dlibrary";
|
|
version = "0.1";
|
|
pyproject = true;
|
|
propagatedBuildInputs = [
|
|
pymupdf
|
|
requests
|
|
dlsite-async
|
|
jinja2
|
|
importlib-resources
|
|
setuptools
|
|
];
|
|
src = ./.;
|
|
};
|
|
};
|
|
defaultPackage.x86_64-linux = self.packages.x86_64-linux.dlibrary;
|
|
};
|
|
}
|