X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/ba3b7c52144a19a83892638415d2bfdb667888f5..79631507ecb69945b7cedb10c3aaed4b8dd788b0:/default.nix?ds=sidebyside diff --git a/default.nix b/default.nix index 69a7149..3e02638 100644 --- a/default.nix +++ b/default.nix @@ -1,19 +1,29 @@ { pkgs ? import { }, lint ? false }: -pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, autopep8, mypy - , pylint, requests, requests-cache, types-requests, xdg-base-dirs }: +pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, makeWrapper + , autopep8, mypy, pylint, beautifulsoup4, requests, requests-cache + , texliveBasic, types-beautifulsoup4, types-requests, xdg-base-dirs + , pandoc-cli }: buildPythonPackage rec { pname = "paperdoorknob"; version = "0.0.1"; src = lib.cleanSource ./.; - propagatedBuildInputs = [ requests requests-cache xdg-base-dirs ]; - nativeCheckInputs = [ mypy types-requests ] + nativeBuildInputs = [ makeWrapper ]; + propagatedBuildInputs = + [ beautifulsoup4 requests requests-cache xdg-base-dirs ]; + nativeCheckInputs = + [ mypy pandoc-cli texliveBasic types-beautifulsoup4 types-requests ] ++ lib.optionals lint [ autopep8 pylint ]; doCheck = true; checkPhase = "./test.sh"; + postInstall = '' + wrapProgram "$out/bin/paperdoorknob" \ + --add-flags "--pandoc=${pandoc-cli}/bin/pandoc" \ + + ''; meta = { description = "A polite glowfic → printable book scraper."; homepage = "https://git.scottworley.com/paperdoorknob"; license = pkgs.lib.licenses.gpl3; maintainers = with pkgs.lib.maintainers; [ chkno ]; }; - }) { } + }) { inherit (pkgs.haskellPackages) pandoc-cli; }