python3Packages.mkdocs-macros-plugin: 1.0.5 -> 1.3.9
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
pytestCheckHook,
|
||||
hjson,
|
||||
jinja2,
|
||||
mkdocs,
|
||||
packaging,
|
||||
pathspec,
|
||||
python-dateutil,
|
||||
pyyaml,
|
||||
termcolor,
|
||||
super-collections,
|
||||
mkdocs-test,
|
||||
mkdocs-material,
|
||||
mkdocs-macros-test,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-macros-plugin";
|
||||
version = "1.3.9";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fralau";
|
||||
repo = "mkdocs-macros-plugin";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-bL7oWWDoF+zH34XSwFY2H9op/97zO43HS+oO6lNFEr4=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
hjson
|
||||
jinja2
|
||||
mkdocs
|
||||
packaging
|
||||
pathspec
|
||||
python-dateutil
|
||||
pyyaml
|
||||
termcolor
|
||||
super-collections
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"mkdocs_macros"
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
mkdocs-test
|
||||
mkdocs-material
|
||||
mkdocs-macros-test
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# we do not have brew and mkdocs-d2-plugin is also not packaged in nixpkgs,
|
||||
"test/plugin_d2/test_t2.py"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code";
|
||||
homepage = "https://github.com/fralau/mkdocs-macros-plugin";
|
||||
changelog = "https://github.com/fralau/mkdocs-macros-plugin/blob/${src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ tljuniper ];
|
||||
};
|
||||
}
|
||||
+14
-8
@@ -2,25 +2,31 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
# Is required for properly testing mkdocs-macros
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-macros-test";
|
||||
version = "0.1.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256:1w12skm8l0r2x6z1va996lvq6z1873d0xzql9n0aja0g0v6s7ay5";
|
||||
hash = "sha256-xaujzQYPKKmATRT/Dto4KHyDNzUpqR2+6SIDiurUIvA=";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "mkdocs_macros_test" ];
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/fralau/mkdocs-macros-test";
|
||||
pythonImportsCheck = [
|
||||
"mkdocs_macros_test"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Implementation of a (model) pluglet for mkdocs-macros";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ tljuniper ];
|
||||
homepage = "https://github.com/fralau/mkdocs-macros-test";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ marcel ];
|
||||
};
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
callPackage,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
mkdocs,
|
||||
jinja2,
|
||||
python-dateutil,
|
||||
termcolor,
|
||||
pyyaml,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-macros-plugin";
|
||||
version = "1.0.5";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-/jSNdfAckR82K22ZjFez2FtQWHbd5p25JPLFEsOVwyg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jinja2
|
||||
termcolor
|
||||
python-dateutil
|
||||
pyyaml
|
||||
mkdocs
|
||||
];
|
||||
|
||||
passthru.tests.example-doc = callPackage ./tests.nix { };
|
||||
|
||||
pythonImportsCheck = [ "mkdocs_macros" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/fralau/mkdocs_macros_plugin";
|
||||
description = "Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ tljuniper ];
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
setuptools,
|
||||
mkdocs,
|
||||
mkdocs-macros,
|
||||
mkdocs-material,
|
||||
runCommand,
|
||||
callPackage,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (mkdocs-macros) pname version src;
|
||||
|
||||
mkdocs-macros-test = callPackage ./mkdocs-macros-test.nix { };
|
||||
|
||||
env = {
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
mkdocs
|
||||
mkdocs-macros
|
||||
mkdocs-macros-test
|
||||
mkdocs-material
|
||||
];
|
||||
};
|
||||
in
|
||||
runCommand "mkdocs-macros-example-docs" env ''
|
||||
set -euo pipefail
|
||||
mkdir $out
|
||||
|
||||
base_dir=${pname}-${version}/test
|
||||
tar --extract "--file=${src}"
|
||||
|
||||
for test_dir in $base_dir/*/; do
|
||||
pushd $test_dir
|
||||
mkdocs build --site-dir=$out/$test_dir
|
||||
popd
|
||||
done
|
||||
|
||||
# Do some static checks on the generated content
|
||||
pushd $out/$base_dir
|
||||
# Non-existent variables
|
||||
cat debug/index.html | grep "another one: that"
|
||||
# File inclusion
|
||||
cat module/index.html | grep "part from an <em>included</em> file!"
|
||||
# Variable replacement
|
||||
cat module_dir/index.html | grep "total costs is 50 euros"
|
||||
# New syntax with square brackets
|
||||
cat new_syntax/index.html | grep "expensive"
|
||||
# General info on macros
|
||||
cat simple/index.html | grep "Macros Plugin Environment"
|
||||
''
|
||||
@@ -9,7 +9,7 @@
|
||||
pyyaml,
|
||||
pytestCheckHook,
|
||||
openpyxl,
|
||||
mkdocs-macros,
|
||||
mkdocs-macros-plugin,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -38,7 +38,7 @@ buildPythonPackage rec {
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
openpyxl
|
||||
mkdocs-macros
|
||||
mkdocs-macros-plugin
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
||||
@@ -442,6 +442,7 @@ mapAliases ({
|
||||
mistune_2_0 = mistune; # added 2022-08-12
|
||||
mitmproxy-wireguard = throw "mitmproxy-wireguard has been removed because it was replaced by upstream with mitmproxy-rs"; # added 2023-11-06
|
||||
mkdocs-awesome-pages-plugin = mkdocs-awesome-nav; # added 2025-03-10
|
||||
mkdocs-macros = mkdocs-macros-plugin; # added 2025-09-02
|
||||
mkdocs-minify = mkdocs-minify-plugin; # added 2023-11-28
|
||||
mne-python = mne; # added 2025-05-02
|
||||
modestmaps = throw "modestmaps is unmaintained and was never enabled for anything except Python27"; # Added 2025-03-23
|
||||
|
||||
@@ -9435,7 +9435,9 @@ self: super: with self; {
|
||||
|
||||
mkdocs-linkcheck = callPackage ../development/python-modules/mkdocs-linkcheck { };
|
||||
|
||||
mkdocs-macros = callPackage ../development/python-modules/mkdocs-macros { };
|
||||
mkdocs-macros-plugin = callPackage ../development/python-modules/mkdocs-macros-plugin { };
|
||||
|
||||
mkdocs-macros-test = callPackage ../development/python-modules/mkdocs-macros-test { };
|
||||
|
||||
mkdocs-markmap = callPackage ../development/python-modules/mkdocs-markmap { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user