nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 55 lines 1.0 kB view raw
1{ lib 2, buildPythonPackage 3, docutils 4, fetchFromGitHub 5, poetry-core 6, pytestCheckHook 7, pythonOlder 8, types-docutils 9, typing-extensions 10}: 11 12buildPythonPackage rec { 13 pname = "rstcheck"; 14 version = "5.0.0"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "myint"; 21 repo = pname; 22 rev = "v${version}"; 23 hash = "sha256-vTUa/eP6/flxRLBuzdHoNoPoGAg6XWwu922az8tLgJM="; 24 }; 25 26 nativeBuildInputs = [ 27 poetry-core 28 ]; 29 30 propagatedBuildInputs = [ 31 docutils 32 types-docutils 33 typing-extensions 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ 41 "rstcheck" 42 ]; 43 44 preCheck = '' 45 # The tests need to find and call the rstcheck executable 46 export PATH="$PATH:$out/bin"; 47 ''; 48 49 meta = with lib; { 50 description = "Checks syntax of reStructuredText and code blocks nested within it"; 51 homepage = "https://github.com/myint/rstcheck"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ staccato ]; 54 }; 55}