python312Packages.mike: unstable-2023-05-06 -> 2.1.3

This commit is contained in:
Marcel 2025-01-26 20:19:52 +01:00
parent 825479c345
commit 6166a66673
No known key found for this signature in database
GPG Key ID: 446F3B093DF81C6A
2 changed files with 45 additions and 23 deletions

View File

@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication mike

View File

@ -2,59 +2,80 @@
lib,
buildPythonPackage,
fetchFromGitHub,
git,
setuptools,
importlib-metadata,
importlib-resources,
jinja2,
mkdocs,
pythonOlder,
pyparsing,
pyyaml,
unittestCheckHook,
pyyaml-env-tag,
verspec,
versionCheckHook,
pytestCheckHook,
git,
shtab,
stdenv,
}:
buildPythonPackage rec {
pname = "mike";
version = "unstable-2023-05-06";
format = "setuptools";
disabled = pythonOlder "3.7";
version = "2.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "jimporter";
repo = pname;
rev = "300593c338b18f61f604d18457c351e166318020";
hash = "sha256-Sjj2275IJDtLjG6uO9h4FbgxXTMgqD8c/rJj6iOxfuI=";
repo = "mike";
tag = "v${version}";
hash = "sha256-eGUkYcPTrXwsZPqyDgHJlEFXzhMnenoZsjeHVGO/9WU=";
};
propagatedBuildInputs = [
build-system = [
setuptools
];
dependencies = [
importlib-metadata
importlib-resources
jinja2
mkdocs
pyparsing
pyyaml
pyyaml-env-tag
verspec
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
__darwinAllowLocalNetworking = true;
nativeCheckInputs = [
pytestCheckHook
git
unittestCheckHook
mkdocs
shtab
];
preCheck = ''
export PATH=$out/bin:$PATH
'';
# Difficult to setup
doCheck = false;
preCheck =
''
export PATH=$out/bin:$PATH
''
# "stat" on darwin results in "not permitted" instead of "does not exists"
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace test/unit/test_git_utils.py \
--replace-fail "/home/nonexist" "$(mktemp -d)"
'';
pythonImportsCheck = [ "mike" ];
meta = with lib; {
description = "Manage multiple versions of your MkDocs-powered documentation";
mainProgram = "mike";
meta = {
description = "Manage multiple versions of your MkDocs-powered documentation via Git";
homepage = "https://github.com/jimporter/mike";
license = licenses.bsd3;
maintainers = [ ];
changelog = "https://github.com/jimporter/mike/blob/v${version}/CHANGES.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ marcel ];
mainProgram = "mike";
};
}