]>
Commit | Line | Data |
---|---|---|
92b11a10 | 1 | { pkgs ? import <nixpkgs> { }, lint ? false }: |
1e512629 SW |
2 | pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper |
3 | , autopep8, mypy, pylint, beautifulsoup4, requests, requests-cache | |
07f9b178 SW |
4 | , texliveBasic, types-beautifulsoup4, types-requests, xdg-base-dirs |
5 | , pandoc-cli }: | |
92b11a10 SW |
6 | buildPythonPackage rec { |
7 | pname = "paperdoorknob"; | |
8 | version = "0.0.1"; | |
9 | src = lib.cleanSource ./.; | |
1e512629 | 10 | nativeBuildInputs = [ makeWrapper ]; |
136277e3 SW |
11 | propagatedBuildInputs = |
12 | [ beautifulsoup4 requests requests-cache xdg-base-dirs ]; | |
07f9b178 SW |
13 | nativeCheckInputs = |
14 | [ mypy pandoc-cli texliveBasic types-beautifulsoup4 types-requests ] | |
b25a2f90 | 15 | ++ lib.optionals lint [ autopep8 pylint ]; |
92b11a10 SW |
16 | doCheck = true; |
17 | checkPhase = "./test.sh"; | |
1e512629 SW |
18 | postInstall = '' |
19 | wrapProgram "$out/bin/paperdoorknob" \ | |
20 | --add-flags "--pandoc=${pandoc-cli}/bin/pandoc" \ | |
21 | ||
22 | ''; | |
92b11a10 SW |
23 | meta = { |
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 ]; | |
28 | }; | |
1e512629 | 29 | }) { inherit (pkgs.haskellPackages) pandoc-cli; } |