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