~kaction/config

86183ad8e99e5901f3a6bc8a5e2fee716f56d42b — Dmitry Bogatov 3 months ago f8a437b
Documentation: add documentation for "click" python module
M universe/Documentation/default.nix => universe/Documentation/default.nix +3 -0
@@ 5,6 5,7 @@ let
  doc-nixpkgs = callPackage ./doc-nixpkgs.nix { inherit nixpkgs; };
  doc-posix = callPackage ./doc-posix.nix { };
  doc-py-dropbox = callPackage ./doc-dropbox.nix { };
  doc-py-click = callPackage ./doc-py-click.nix { };
  doc-python = callPackage ./doc-python.nix { };
  doc-uwsgi = callPackage ./doc-uwsgi.nix { };
  doc-jsonschema = callPackage ./doc-jsonschema.nix { };


@@ 30,8 31,10 @@ in runCommand "Documentation" { } ''
  ln -sf ${postgresql_10.doc}/share/doc/postgresql/html/bookindex.html postgresql-10.html
  ln -sf ${doc-nixpkgs}/share/doc/nixpkgs/manual.html NixPkgs.html
  ln -sf ${doc-py-dropbox}/html/index.html python/dropbox.html
  ln -sf ${doc-py-click}/html/index.html python/click.html
  ln -sf ${doc-uwsgi}/html/index.html python/uwsgi.html
  ln -sf ${doc-py-dropbox}/singlehtml/index.html python/_singlepage-dropbox.html
  ln -sf ${doc-py-click}/singlehtml/index.html python/_singlepage-click.html
  ln -sf ${haskellPackages.dhall.doc}/share/doc/*/html/index.html haskell/dhall.html
  ln -sf ${haskellPackages.megaparsec.doc}/share/doc/*/html/index.html haskell/megaparsec.html
  ln -sf ${haskellPackages.lens.doc}/share/doc/*/html/index.html haskell/lens.html

A universe/Documentation/doc-py-click.nix => universe/Documentation/doc-py-click.nix +22 -0
@@ 0,0 1,22 @@
{ stdenv, python3 }:
stdenv.mkDerivation {
  name = "Documentation-click.py";
  src = builtins.fetchGit {
    url = "https://github.com/pallets/click";
    rev = "1784558ed7c75c65764d2a434bd9cbb206ca939d"; # rev 7.1.2
  };
  nativeBuildInputs = [
    python3.pkgs.click
    python3.pkgs.sphinx
    python3.pkgs.sphinx-issues
    python3.pkgs.sphinx_pallets_theme
    python3.pkgs.sphinxcontrib-logcabinet
  ];
  installPhase = ''
    cd docs
    sphinx-build -b singlehtml -d _build/doctrees . $out/singlehtml
    sphinx-build -b html -d _build/doctrees . $out/html
    cd ..
  '';
  phases = [ "unpackPhase" "installPhase" ];
}

M universe/python3/overrides.nix => universe/python3/overrides.nix +39 -0
@@ 37,6 37,45 @@ self: super: {
    doCheck = false;
    doInstallCheck = false;
  };
  sphinx_pallets_theme = super.buildPythonPackage rec {
    pname = "Pallets-Sphinx-Themes";
    version = "1.2.3";
    src = super.fetchPypi {
      inherit pname version;
      hash = "sha256-u7T9biWdSY5OW0hmhg8S8MTlmmfJrCQ+uMFHLLxzCq8=";
    };
    propagatedBuildInputs = with super; [ packaging sphinx ];
    doCheck = false;
    doInstallCheck = false;
  };

  sphinx-issues = super.buildPythonPackage rec {
    pname = "sphinx-issues";
    version = "1.2.0";
    src = super.fetchPypi {
      inherit pname version;
      hash = "sha256-hFKUc2x6xMCccG8TQx9wnhFkA3y7APa/Yjrhbsz1CfM";
    };
    propagatedBuildInputs = with super; [ sphinx ];
  };

  sphinxcontrib-logcabinet = super.buildPythonPackage rec {
    pname = "sphinxcontrib-log-cabinet";
    version = "1.0.1";
    src = super.fetchPypi {
      inherit pname version;
      hash = "sha256-EDsuYt9OV6u5Q76gXunCvrfakiIiyLdzFP/Wq5kBxVg";
    };

    # This is probably wrong, since other sphinxcontrib-* modules do not
    # contain __init__.py file, but happens to work for my one-off case:
    # to build offline documentation for python-click.
    postInstall = let v = super.python.pythonVersion;
    in "touch $out/lib/python${v}/site-packages/sphinxcontrib/__init__.py";

    propagatedBuildInputs = with super; [ sphinx ];
  };

  cjkwrap = super.buildPythonPackage rec {
    pname = "CJKwrap";
    version = "2.2";