push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
diff --git a/hotdoc/extensions/c/c_extension.py b/hotdoc/extensions/c/c_extension.py
index 1cfd5b3..cff20c8 100644
--- a/hotdoc/extensions/c/c_extension.py
+++ b/hotdoc/extensions/c/c_extension.py
@@ -89,7 +89,7 @@ def get_clang_headers():
try:
# Clang 5.0+ can tell us directly
resource_dir = subprocess.check_output(
- ['clang', '--print-resource-dir']).strip().decode()
+ ['@clang@', '--print-resource-dir']).strip().decode()
if len(resource_dir) > 0:
include_dir = os.path.join(resource_dir, 'include')
if os.path.exists(include_dir):
diff --git a/hotdoc/extensions/c/clang/cindex.py b/hotdoc/extensions/c/clang/cindex.py
index fc93fda..2eb8eaf 100644
--- a/hotdoc/extensions/c/clang/cindex.py
+++ b/hotdoc/extensions/c/clang/cindex.py
@@ -3937,20 +3937,23 @@ class Config:
if Config.library_file:
return Config.library_file
- import platform
- name = platform.system()
+ if Config.library_path:
+ import platform
+ name = platform.system()
- if name == 'Darwin':
- file = 'libclang.dylib'
- elif name == 'Windows':
- file = 'libclang.dll'
- else:
- file = 'libclang.so'
+ if name == 'Darwin':
+ file = 'libclang.dylib'
+ elif name == 'Windows':
+ file = 'libclang.dll'
+ else:
+ file = 'libclang.so'
- if Config.library_path:
- file = Config.library_path + '/' + file
+ if Config.library_path:
+ file = Config.library_path + '/' + file
+
+ return file
- return file
+ return "@libclang@"
def get_cindex_library(self):
try:

View File

@@ -0,0 +1,147 @@
{
lib,
stdenv,
buildPythonApplication,
fetchPypi,
replaceVars,
clang,
libclang,
pytestCheckHook,
pkg-config,
cmake,
flex,
glib,
json-glib,
libxml2,
appdirs,
backports-entry-points-selectable,
dbus-deviation,
faust-cchardet,
feedgen,
lxml,
networkx,
pkgconfig,
pyyaml,
schema,
setuptools,
toposort,
wheezy-template,
llvmPackages,
gst_all_1,
}:
buildPythonApplication rec {
pname = "hotdoc";
version = "0.17.4";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-xNXf9kfwOqh6HS0GA10oGe3QmbkWNeOy7jkIKTV66fw=";
};
patches = [
(replaceVars ./clang.patch {
clang = lib.getExe clang;
libclang = "${lib.getLib libclang}/lib/libclang${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];
build-system = [ setuptools ];
nativeBuildInputs = [
pkg-config
cmake
flex
];
buildInputs = [
glib
json-glib
libxml2.dev
];
dependencies = [
appdirs
backports-entry-points-selectable
dbus-deviation
faust-cchardet
feedgen
lxml
networkx
pkgconfig
pyyaml
schema
setuptools # for pkg_resources
toposort
wheezy-template
];
nativeCheckInputs = [ pytestCheckHook ];
# CMake is used to build CMARK, but the build system is still python
dontUseCmakeConfigure = true;
# Ensure C+GI+GST extensions are built and can be imported
pythonImportsCheck = [
"hotdoc.extensions.c.c_extension"
"hotdoc.extensions.gi.gi_extension"
"hotdoc.extensions.gst.gst_extension"
];
pytestFlags = [
# Run the tests by package instead of current dir
"--pyargs"
"hotdoc"
];
disabledTestPaths = [
# Executing hotdoc exits with code 1
"tests/test_hotdoc.py::TestHotdoc::test_basic"
"tests/test_hotdoc.py::TestHotdoc::test_explicit_conf_file"
"tests/test_hotdoc.py::TestHotdoc::test_implicit_conf_file"
"tests/test_hotdoc.py::TestHotdoc::test_private_folder"
];
disabledTests = [
# Test does not correctly handle path normalization for test comparison
"test_cli_overrides"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# Test does not correctly handle absolute /home paths on Darwin (even fake ones)
"test_index"
];
postPatch =
# Hardcode libclang paths
''
substituteInPlace hotdoc/extensions/c/c_extension.py \
--replace "shutil.which('llvm-config')" 'True' \
--replace "subprocess.check_output(['llvm-config', '--version']).strip().decode()" '"${lib.versions.major llvmPackages.libclang.version}"' \
--replace "subprocess.check_output(['llvm-config', '--prefix']).strip().decode()" '"${lib.getLib llvmPackages.libclang}"' \
--replace "subprocess.check_output(['llvm-config', '--libdir']).strip().decode()" '"${lib.getLib llvmPackages.libclang}/lib"'
''
# <https://github.com/MathieuDuponchelle/cmark/pull/2>
+ ''
patch -p1 -d cmark -i ${./fix-cmake-4.patch}
'';
# Make pytest run from a temp dir to have it pick up installed package for cmark
preCheck = ''
pushd $TMPDIR
'';
postCheck = ''
popd
'';
passthru.tests = {
inherit (gst_all_1) gstreamer gst-plugins-base;
};
meta = with lib; {
description = "Tastiest API documentation system";
homepage = "https://hotdoc.github.io/";
license = [ licenses.lgpl21Plus ];
maintainers = [ ];
};
}

View File

@@ -0,0 +1,69 @@
From 60cac435fb801b3efce4f85643ac42cef5b22805 Mon Sep 17 00:00:00 2001
From: Saleem Abdulrasool <compnerd@compnerd.org>
Date: Sun, 22 Dec 2019 11:32:37 -0800
Subject: [PATCH 1/2] build: chmod -x CMakeLists.txt (NFC)
Remove the unnecessary execute permission on CMakeLists.txt.
---
CMakeLists.txt | 0
1 file changed, 0 insertions(+), 0 deletions(-)
mode change 100755 => 100644 CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
old mode 100755
new mode 100644
From e922e337bf405b043788dd5febf9957e19d11300 Mon Sep 17 00:00:00 2001
From: Chris Mayo <aklhfex@gmail.com>
Date: Wed, 13 Aug 2025 19:27:03 +0100
Subject: [PATCH 2/2] CMake 4 compatibility
All CMake versions older than 3.10 are deprecated.
---
CMakeLists.txt | 17 ++---------------
extensions/CMakeLists.txt | 2 +-
2 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff97419f8..83d44f0a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,12 +1,6 @@
-cmake_minimum_required(VERSION 2.8.9)
+cmake_minimum_required(VERSION 3.10)
-# prevent ugly developer warnings because version is set directly, not through project()
-# it should be redone properly by using VERSION in project() if on CMake 3.x
-if(CMAKE_MAJOR_VERSION GREATER 2)
- cmake_policy(SET CMP0048 OLD)
-endif()
-
-project(cmark)
+project(cmark VERSION 0.28.3)
include("FindAsan.cmake")
@@ -14,13 +8,6 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")
endif()
-set(PROJECT_NAME "cmark")
-
-set(PROJECT_VERSION_MAJOR 0)
-set(PROJECT_VERSION_MINOR 28)
-set(PROJECT_VERSION_PATCH 3)
-set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} )
-
option(CMARK_TESTS "Build cmark tests and enable testing" ON)
option(CMARK_STATIC "Build static libcmark library" ON)
option(CMARK_SHARED "Build shared libcmark library" ON)
diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt
index e62d1550f..b6a1556e9 100644
--- a/extensions/CMakeLists.txt
+++ b/extensions/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.10)
set(LIBRARY "cmarkextensions")
set(LIBRARY_SOURCES
core-extensions.c