1{ lib, buildPythonPackage, fetchFromGitHub, sphinx }: 2 3buildPythonPackage rec { 4 pname = "sphinxemoji"; 5 version = "0.2.0"; 6 7 outputs = [ "out" "doc" ]; 8 9 src = fetchFromGitHub { 10 owner = "sphinx-contrib"; 11 repo = "emojicodes"; # does not match pypi name 12 rev = "v${version}"; 13 sha256 = "sha256-TLhjpJpUIoDAe3RZ/7sjTgdW+5s7OpMEd1/w0NyCQ3A="; 14 }; 15 16 propagatedBuildInputs = [ sphinx ]; 17 18 nativeBuildInputs = [ sphinx ]; 19 20 postBuild = '' 21 PYTHONPATH=$PWD:$PYTHONPATH make -C docs html 22 ''; 23 24 postInstall = '' 25 mkdir -p $out/share/doc/python/$pname 26 cp -r ./docs/build/html $out/share/doc/python/$pname 27 ''; 28 29 pythonImportsCheck = [ "sphinxemoji" ]; 30 31 meta = with lib; { 32 description = "Extension to use emoji codes in your Sphinx documentation"; 33 homepage = "https://github.com/sphinx-contrib/emojicodes"; 34 license = licenses.mit; 35 maintainers = with maintainers; [ kaction ]; 36 }; 37}