1 { pkgs ? import <nixpkgs> { }, lint ? false }:
2 pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper
3 , autopep8, mypy, pylint, beautifulsoup4, requests, requests-cache
4 , texliveBasic, types-beautifulsoup4, types-requests, xdg-base-dirs
6 buildPythonPackage rec {
7 pname = "paperdoorknob";
9 src = lib.cleanSource ./.;
10 nativeBuildInputs = [ makeWrapper ];
11 propagatedBuildInputs =
12 [ beautifulsoup4 requests requests-cache xdg-base-dirs ];
14 [ mypy pandoc-cli texliveBasic types-beautifulsoup4 types-requests ]
15 ++ lib.optionals lint [ autopep8 pylint ];
17 checkPhase = "./test.sh";
19 wrapProgram "$out/bin/paperdoorknob" \
20 --add-flags "--pandoc=${pandoc-cli}/bin/pandoc" \
24 description = "A polite glowfic → printable book scraper.";
25 homepage = "https://git.scottworley.com/paperdoorknob";
26 license = pkgs.lib.licenses.gpl3;
27 maintainers = with pkgs.lib.maintainers; [ chkno ];
29 }) { inherit (pkgs.haskellPackages) pandoc-cli; }