Merge staging-next into staging
This commit is contained in:
@@ -48,51 +48,49 @@ in
|
||||
};
|
||||
|
||||
strategies = lib.mkOption {
|
||||
default = null;
|
||||
default = { };
|
||||
description = ''
|
||||
Additional strategies which can be used by fw-fanctrl
|
||||
'';
|
||||
type = lib.types.nullOr (
|
||||
lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
fanSpeedUpdateFrequency = lib.mkOption {
|
||||
type = lib.types.ints.unsigned;
|
||||
default = 5;
|
||||
description = "How often the fan speed should be updated in seconds";
|
||||
};
|
||||
|
||||
movingAverageInterval = lib.mkOption {
|
||||
type = lib.types.ints.unsigned;
|
||||
default = 25;
|
||||
description = "Interval (seconds) of the last temperatures to use to calculate the average temperature";
|
||||
};
|
||||
|
||||
speedCurve = lib.mkOption {
|
||||
default = [ ];
|
||||
description = "How should the speed curve look like";
|
||||
type = lib.types.listOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
temp = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 0;
|
||||
description = "Temperature in °C at which the fan speed should be changed";
|
||||
};
|
||||
|
||||
speed = lib.mkOption {
|
||||
type = lib.types.ints.between 0 100;
|
||||
default = 0;
|
||||
description = "Percent how fast the fan should run at";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
fanSpeedUpdateFrequency = lib.mkOption {
|
||||
type = lib.types.ints.unsigned;
|
||||
default = 5;
|
||||
description = "How often the fan speed should be updated in seconds";
|
||||
};
|
||||
}
|
||||
)
|
||||
|
||||
movingAverageInterval = lib.mkOption {
|
||||
type = lib.types.ints.unsigned;
|
||||
default = 25;
|
||||
description = "Interval (seconds) of the last temperatures to use to calculate the average temperature";
|
||||
};
|
||||
|
||||
speedCurve = lib.mkOption {
|
||||
default = [ ];
|
||||
description = "How should the speed curve look like";
|
||||
type = lib.types.listOf (
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
temp = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 0;
|
||||
description = "Temperature in °C at which the fan speed should be changed";
|
||||
};
|
||||
|
||||
speed = lib.mkOption {
|
||||
type = lib.types.ints.between 0 100;
|
||||
default = 0;
|
||||
description = "Percent how fast the fan should run at";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
version,
|
||||
|
||||
autoPatchelfHook,
|
||||
flutter327,
|
||||
flutter,
|
||||
gtkmm3,
|
||||
keybinder3,
|
||||
lib,
|
||||
@@ -15,7 +15,7 @@
|
||||
protoc-gen-dart,
|
||||
qt6,
|
||||
}:
|
||||
flutter327.buildFlutterApplication {
|
||||
flutter.buildFlutterApplication {
|
||||
inherit version;
|
||||
pname = "multipass-gui";
|
||||
src = multipass_src;
|
||||
@@ -25,9 +25,9 @@ flutter327.buildFlutterApplication {
|
||||
pubspecLock = lib.importJSON ./pubspec.lock.json;
|
||||
|
||||
gitHashes = {
|
||||
dartssh2 = "sha256-2pypKwurziwGLZYuGaxlS2lzN3UvJp3bRTvvYYxEqRI=";
|
||||
dartssh2 = "sha256-9XrxxOamy0uS7kUz6mwWwp4yIBHLX/GSoyxMk/Wwa+4=";
|
||||
hotkey_manager_linux = "sha256-aO0h94YZvgV/ggVupNw8GjyZsnXrq3qTHRDtuhNv3oI=";
|
||||
tray_menu = "sha256-riiAiBEms+9ARog8i+MR1fto1Yqx+gwbBWyNbNq6VTM=";
|
||||
tray_menu = "sha256-TAlRW7VkZWAoHAVlrPeDqS3BsqhQTyCekYQ2b4AEqjU=";
|
||||
window_size = "sha256-71PqQzf+qY23hTJvcm0Oye8tng3Asr42E2vfF1nBmVA=";
|
||||
xterm = "sha256-h8vIonTPUVnNqZPk/A4ZV7EYCMyM0rrErL9ZOMe4ZBE=";
|
||||
};
|
||||
@@ -49,6 +49,11 @@ flutter327.buildFlutterApplication {
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
# Temporary fix which can be removed in the next release.
|
||||
# Already addressed upstream, but part of a larger patch
|
||||
# that did not trivially apply.
|
||||
substituteInPlace lib/main.dart --replace-fail 'TabBarTheme(' 'TabBarThemeData('
|
||||
|
||||
mkdir -p lib/generated
|
||||
|
||||
# Generate the Dart gRPC code for the Multipass GUI.
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
cmake,
|
||||
dnsmasq,
|
||||
fetchFromGitHub,
|
||||
fmt_11,
|
||||
git,
|
||||
grpc,
|
||||
gtest,
|
||||
iproute2,
|
||||
iptables,
|
||||
@@ -27,18 +29,6 @@
|
||||
xterm,
|
||||
}:
|
||||
|
||||
let
|
||||
# This is done here because a CMakeLists.txt from one of it's submodules tries
|
||||
# to modify a file, so we grab the source for the submodule here, copy it into
|
||||
# the source of the Multipass project which allows the modification to happen.
|
||||
grpc_src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "grpc";
|
||||
rev = "ba8e7f72a57b9e0b25783a4d3cea58c79379f194";
|
||||
hash = "sha256-DS1UNLCUdbipn5w4p2aVa8LgHHhdJiAfzfEdIXNO69o=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
pname = "multipassd";
|
||||
@@ -54,8 +44,6 @@ stdenv.mkDerivation {
|
||||
# in the Nix build environment. This patch disables the fetch in favour of providing
|
||||
# the googletest library from nixpkgs.
|
||||
./cmake_no_fetch.patch
|
||||
# Ensures '-Wno-ignored-attributes' is supported by the compiler before attempting to build.
|
||||
./cmake_warning.patch
|
||||
# As of Multipass 1.14.0, the upstream started using vcpkg for grabbing C++ dependencies,
|
||||
# which doesn't work in the nix build environment. This patch reverts that change, in favour
|
||||
# of providing those dependencies manually in this derivation.
|
||||
@@ -83,9 +71,6 @@ stdenv.mkDerivation {
|
||||
--replace-fail "OVMF.fd" "${OVMF.fd}/FV/OVMF.fd" \
|
||||
--replace-fail "QEMU_EFI.fd" "${OVMF.fd}/FV/QEMU_EFI.fd"
|
||||
|
||||
# Copy the grpc submodule we fetched into the source code.
|
||||
cp -r --no-preserve=mode ${grpc_src} 3rd-party/grpc
|
||||
|
||||
# Configure CMake to use gtest from the nix store since we disabled fetching from the internet.
|
||||
cat >> tests/CMakeLists.txt <<'EOF'
|
||||
add_library(gtest INTERFACE)
|
||||
@@ -111,6 +96,8 @@ stdenv.mkDerivation {
|
||||
cmakeFlags = [ "-DMULTIPASS_ENABLE_FLUTTER_GUI=false" ];
|
||||
|
||||
buildInputs = [
|
||||
fmt_11
|
||||
grpc
|
||||
gtest
|
||||
libapparmor
|
||||
libvirt
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
let
|
||||
name = "multipass";
|
||||
version = "1.15.1";
|
||||
version = "1.16.0";
|
||||
|
||||
multipass_src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "multipass";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-ckIvijNWav8gCL8b+Iw84tWS4cpTobJDdHwh/p+Y3NI=";
|
||||
hash = "sha256-7P7LZEvZ+ygM0G8C/gMIwq5BOSs4wSVEBNgsaZzBbOk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -40,21 +40,6 @@ update_multipass_source() {
|
||||
sed -i "s|hash = \".*$|hash = \"${sri_hash}\";|" package.nix
|
||||
}
|
||||
|
||||
# Update the version/hash of the grpc source code in the Nix expression.
|
||||
update_grpc_source() {
|
||||
local version; version="$1"
|
||||
echo "Updating grpc source"
|
||||
|
||||
submodule_info="https://raw.githubusercontent.com/canonical/multipass/refs/tags/v${version}/3rd-party/submodule_info.md"
|
||||
commit_short="$(curl -s "${submodule_info}" | grep -Po "CanonicalLtd/grpc/compare/v[0-9]+\.[0-9]+\.[0-9]+\.\.\K[0-9a-f]+")"
|
||||
commit_hash="$(curl -s "https://github.com/canonical/grpc/commits/${commit_short}" | grep -Po "${commit_short}[0-9a-f]+" | head -n1)"
|
||||
sri_hash="$(nix-prefetch-github canonical grpc --rev "${commit_hash}" --fetch-submodules | jq -r '.hash')"
|
||||
|
||||
sed -i "s|rev = \".*$|rev = \"${commit_hash}\";|" multipassd.nix
|
||||
sed -i "s|hash = \".*$|hash = \"${sri_hash}\";|" multipassd.nix
|
||||
}
|
||||
|
||||
|
||||
LATEST_TAG="$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} https://api.github.com/repos/canonical/multipass/releases/latest | jq -r '.tag_name')"
|
||||
LATEST_VERSION="$(expr "$LATEST_TAG" : 'v\(.*\)')"
|
||||
CURRENT_VERSION="$(grep -Po "version = \"\K[^\"]+" package.nix)"
|
||||
@@ -66,12 +51,11 @@ fi
|
||||
|
||||
update_pubspec_json "$LATEST_VERSION"
|
||||
|
||||
update_dart_pkg_hash dartssh2 andrei-toterman dartssh2
|
||||
update_dart_pkg_hash hotkey_manager_linux andrei-toterman hotkey_manager
|
||||
update_dart_pkg_hash tray_menu andrei-toterman tray_menu
|
||||
update_dart_pkg_hash dartssh2 canonical dartssh2
|
||||
update_dart_pkg_hash hotkey_manager_linux canonical hotkey_manager
|
||||
update_dart_pkg_hash tray_menu canonical tray_menu
|
||||
update_dart_pkg_hash window_size google flutter-desktop-embedding
|
||||
update_dart_pkg_hash xterm levkropp xterm.dart
|
||||
|
||||
update_multipass_source "$LATEST_VERSION"
|
||||
|
||||
update_grpc_source "$LATEST_VERSION"
|
||||
|
||||
@@ -1,68 +1,9 @@
|
||||
diff --git a/3rd-party/CMakeLists.txt b/3rd-party/CMakeLists.txt
|
||||
index 73291f6c..c1a38198 100644
|
||||
--- a/3rd-party/CMakeLists.txt
|
||||
+++ b/3rd-party/CMakeLists.txt
|
||||
@@ -4,6 +4,24 @@ if (MSVC)
|
||||
add_compile_options(-wd5045) #Disable warning about Spectre mitigation
|
||||
endif()
|
||||
|
||||
+include(FetchContent)
|
||||
+set(FETCHCONTENT_QUIET FALSE)
|
||||
+
|
||||
+FetchContent_Declare(gRPC
|
||||
+ DOWNLOAD_COMMAND true
|
||||
+ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/grpc
|
||||
+)
|
||||
+
|
||||
+set(gRPC_SSL_PROVIDER "package" CACHE STRING "Provider of ssl library")
|
||||
+
|
||||
+FetchContent_MakeAvailable(gRPC)
|
||||
+
|
||||
+# Workaround for zlib placing its generated zconf.h file in the build dir,
|
||||
+# and protobuf not knowing so finding the system version instead
|
||||
+include_directories(${grpc_SOURCE_DIR}/third_party/zlib)
|
||||
+
|
||||
+set_property(DIRECTORY ${grpc_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL YES)
|
||||
+
|
||||
# Generates gRPC and protobuf C++ sources and headers from the given .proto files
|
||||
#
|
||||
# generate_grpc_cpp (<SRCS> <DEST> [<ARGN>...])
|
||||
@@ -34,9 +52,9 @@ function(generate_grpc_cpp SRCS DEST)
|
||||
"${DEST}/${FIL_WE}.grpc.pb.h"
|
||||
"${DEST}/${FIL_WE}.pb.cc"
|
||||
"${DEST}/${FIL_WE}.pb.h"
|
||||
- COMMAND $<TARGET_FILE:protobuf::protoc>
|
||||
- ARGS --grpc_out=${DEST} --cpp_out=${DEST} --proto_path=${FIL_DIR} --proto_path=${grpc_SOURCE_DIR}/third_party/protobuf/src --plugin=protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin> ${ABS_FIL}
|
||||
- DEPENDS ${ABS_FIL}
|
||||
+ COMMAND $<TARGET_FILE:protoc>
|
||||
+ ARGS --grpc_out=${DEST} --cpp_out=${DEST} --proto_path=${FIL_DIR} --proto_path=${grpc_SOURCE_DIR}/third_party/protobuf/src --plugin=protoc-gen-grpc=$<TARGET_FILE:grpc_cpp_plugin> ${ABS_FIL}
|
||||
+ DEPENDS ${ABS_FIL} protoc grpc_cpp_plugin
|
||||
COMMENT "Running gRPC C++ protocol buffer compiler on ${FIL}"
|
||||
VERBATIM)
|
||||
endforeach ()
|
||||
@@ -47,9 +65,14 @@ endfunction()
|
||||
|
||||
add_library(gRPC INTERFACE)
|
||||
|
||||
+target_include_directories(gRPC INTERFACE
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/grpc/include
|
||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/grpc/third_party/protobuf/src)
|
||||
+
|
||||
target_link_libraries(gRPC INTERFACE
|
||||
- gRPC::grpc++
|
||||
- protobuf::libprotobuf)
|
||||
+ grpc++
|
||||
+ libprotobuf
|
||||
+ zlibstatic)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_compile_options(gRPC INTERFACE "-Wno-unused-parameter" "-Wno-non-virtual-dtor" "-Wno-pedantic")
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 18e47b74..d5bf5dea 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -49,9 +49,6 @@ if(NOT DEFINED VCPKG_BUILD_DEFAULT)
|
||||
set(VCPKG_TARGET_TRIPLET "${VCPKG_HOST_ARCH}-${VCPKG_HOST_OS}-release")
|
||||
diff --git i/CMakeLists.txt w/CMakeLists.txt
|
||||
index fd8d446c8..870a2c19c 100644
|
||||
--- i/CMakeLists.txt
|
||||
+++ w/CMakeLists.txt
|
||||
@@ -83,9 +83,6 @@ else()
|
||||
message(STATUS "Bootstrapping vcpkg completed successfully.")
|
||||
endif()
|
||||
|
||||
-set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/3rd-party/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
@@ -71,13 +12,3 @@ index 18e47b74..d5bf5dea 100644
|
||||
project(Multipass)
|
||||
|
||||
option(MULTIPASS_ENABLE_TESTS "Build tests" ON)
|
||||
@@ -125,9 +122,6 @@ endif()
|
||||
# OpenSSL config
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
-# gRPC config
|
||||
-find_package(gRPC CONFIG REQUIRED)
|
||||
-
|
||||
# Needs to be here before we set further compilation options
|
||||
add_subdirectory(3rd-party)
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
buildGoModule {
|
||||
pname = "pkgsite";
|
||||
version = "0-unstable-2025-07-14";
|
||||
version = "0-unstable-2025-07-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golang";
|
||||
repo = "pkgsite";
|
||||
rev = "01b046e81fe76030480fef8109ae0f3627dabcc0";
|
||||
hash = "sha256-3hqLi50WJlDgRPdZ/WBydRxb+HLRnT7R79e9vOiqUgg=";
|
||||
rev = "d4de6668b91034bd7c6315aff98f232c1339335f";
|
||||
hash = "sha256-H3yL82obJ/z8BDeyLdR1DVCxsPwrn0xxHLoMFHKhQn8=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-sHpWI3oUuazFlWJhHB5uZ89z1GPbPfLoFQL12Jk3NP0=";
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "tippecanoe";
|
||||
version = "2.78.0";
|
||||
version = "2.79.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "felt";
|
||||
repo = "tippecanoe";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-RSth1mFiVHtiZkGVvaIRxNQ3nYtV/GAL64D7fFB1NYs=";
|
||||
hash = "sha256-oEGjeOJWOV7ZO6GjpzC+rbvxyKDm7w64NQ6m43Wa30k=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
beautifulsoup4,
|
||||
mkdocs,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-backlinks";
|
||||
version = "0.9.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "danodic-dev";
|
||||
repo = "mkdocs-backlinks";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-P3CUm7jpmcgipn/SKpZMWhpEqJSpirADMpud10ULXDs=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
beautifulsoup4
|
||||
mkdocs
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"backlinks_plugin"
|
||||
];
|
||||
|
||||
# No tests available
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Plugin for adding backlinks to mkdocs";
|
||||
homepage = "https://github.com/danodic-dev/mkdocs-backlinks/";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitLab,
|
||||
replaceVars,
|
||||
graphviz,
|
||||
setuptools,
|
||||
markdown,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-graphviz";
|
||||
version = "1.5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "rod2ik";
|
||||
repo = "mkdocs-graphviz";
|
||||
tag = version;
|
||||
hash = "sha256-5pc5RpOrDSONZcgIQMNsVxYwFyJ+PMcIt0GXDxCEyOg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Replace the path to the `graphviz` commands to use the one provided by Nixpkgs.
|
||||
(replaceVars ./replace-path-to-dot.patch {
|
||||
command = "\"${graphviz}/bin/\" + command";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
markdown
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "mkdocs_graphviz" ];
|
||||
|
||||
# Tests are not available in the source code.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Configurable Python markdown extension for graphviz and Mkdocs";
|
||||
homepage = "https://gitlab.com/rod2ik/mkdocs-graphviz";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
diff --git i/mkdocs_graphviz.py w/mkdocs_graphviz.py
|
||||
index 3aa190f..390e540 100644
|
||||
--- i/mkdocs_graphviz.py
|
||||
+++ w/mkdocs_graphviz.py
|
||||
@@ -372,7 +372,7 @@ class MkdocsGraphvizPreprocessor(markdown.preprocessors.Preprocessor):
|
||||
|
||||
# RAW GRAPHVIZ BLOCK CONTENT
|
||||
content = m.group('content')
|
||||
- args = [command, '-T'+filetype]
|
||||
+ args = [@command@, '-T'+filetype]
|
||||
|
||||
try:
|
||||
bgcolor = self.config['bgcolor'][0]
|
||||
@@ -384,9 +384,9 @@ class MkdocsGraphvizPreprocessor(markdown.preprocessors.Preprocessor):
|
||||
edge_fontcolor = self.config['edge_fontcolor'][0]
|
||||
|
||||
if self.config['bgcolor'][0] == 'None' or self.config['bgcolor'][0] == 'none':
|
||||
- args = [command, '-Gbgcolor=none', f'-Gcolor={graph_color}', f'-Gfontcolor={graph_fontcolor}', f'-Ncolor={node_color}', f'-Nfontcolor={node_fontcolor}', f'-Ecolor={edge_color}', f'-Efontcolor={edge_fontcolor}', '-T'+filetype]
|
||||
+ args = [@command@, '-Gbgcolor=none', f'-Gcolor={graph_color}', f'-Gfontcolor={graph_fontcolor}', f'-Ncolor={node_color}', f'-Nfontcolor={node_fontcolor}', f'-Ecolor={edge_color}', f'-Efontcolor={edge_fontcolor}', '-T'+filetype]
|
||||
else:
|
||||
- args = [command, f'-Gcolor={graph_color}', f'-Gfontcolor={graph_fontcolor}', f'-Gbgcolor={bgcolor}', f'-Ncolor={node_color}', f'-Nfontcolor={node_fontcolor}', f'-Ecolor={edge_color}', f'-Efontcolor={edge_fontcolor}', '-T'+filetype]
|
||||
+ args = [@command@, f'-Gcolor={graph_color}', f'-Gfontcolor={graph_fontcolor}', f'-Gbgcolor={bgcolor}', f'-Ncolor={node_color}', f'-Nfontcolor={node_fontcolor}', f'-Ecolor={edge_color}', f'-Efontcolor={edge_fontcolor}', '-T'+filetype]
|
||||
|
||||
proc = subprocess.Popen(
|
||||
args,
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
poetry-core,
|
||||
httpx,
|
||||
markdown,
|
||||
mkdocs,
|
||||
msgpack,
|
||||
rich,
|
||||
pytestCheckHook,
|
||||
pytest-httpx,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-puml";
|
||||
version = "2.3.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MikhailKravets";
|
||||
repo = "mkdocs_puml";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-DOGS2lnFIpFdpJxIw9PJ/kvtAOhVtAJOQeMR+CVjkE0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix permission of copied files from the store so that they are
|
||||
# overwritable.
|
||||
./fix-permissions.patch
|
||||
];
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"httpx"
|
||||
"rich"
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
httpx
|
||||
markdown
|
||||
mkdocs
|
||||
msgpack
|
||||
rich
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "mkdocs_puml" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-httpx
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Brings PlantUML to MkDocs";
|
||||
homepage = "https://github.com/MikhailKravets/mkdocs_puml";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git i/mkdocs_puml/plugin.py w/mkdocs_puml/plugin.py
|
||||
index e9e0f5b..7435327 100644
|
||||
--- i/mkdocs_puml/plugin.py
|
||||
+++ w/mkdocs_puml/plugin.py
|
||||
@@ -221,6 +221,12 @@ class PlantUMLPlugin(BasePlugin[PlantUMLConfig]):
|
||||
# shutil.copy(puml_js, dest_dir)
|
||||
shutil.copytree(static_dir, dest_dir, dirs_exist_ok=True)
|
||||
|
||||
+ # Make sure all the files in dest_dir are writable
|
||||
+ for root, dirs, files in os.walk(dest_dir):
|
||||
+ for file in files:
|
||||
+ file_path = Path(root).joinpath(file)
|
||||
+ file_path.chmod(0o644)
|
||||
+
|
||||
self.storage.save()
|
||||
|
||||
def _replace(self, key: str, content: str) -> str:
|
||||
@@ -14,7 +14,7 @@
|
||||
# server, and the FHS userenv and corresponding NixOS module should
|
||||
# automatically pick up the changes.
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.41.8.9834-071366d65";
|
||||
version = "1.41.9.9961-46083195d";
|
||||
pname = "plexmediaserver";
|
||||
|
||||
# Fetch the source
|
||||
@@ -22,12 +22,12 @@ stdenv.mkDerivation rec {
|
||||
if stdenv.hostPlatform.system == "aarch64-linux" then
|
||||
fetchurl {
|
||||
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_arm64.deb";
|
||||
sha256 = "0y62k1bqp5ydx2yyyicp24535dkg8a7jhd7vcsj3vx58kis4f2fd";
|
||||
sha256 = "1gxiwzv799w2b18mlq1yx5z3x9k51f88yc9k7mmcn5a224a11kxf";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb";
|
||||
sha256 = "0bh1lzsd2z8jmkpbq6s9xy08595jmiqcq2vqvbd6cfa9zkbbl6by";
|
||||
sha256 = "0hnwsh9x48xx9grgv4j30ymbr7v9bdfkl3dnfwjbqr0g3zb22av2";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -9269,6 +9269,8 @@ self: super: with self; {
|
||||
|
||||
mkdocs-awesome-nav = callPackage ../development/python-modules/mkdocs-awesome-nav { };
|
||||
|
||||
mkdocs-backlinks = callPackage ../development/python-modules/mkdocs-backlinks { };
|
||||
|
||||
mkdocs-drawio-exporter = callPackage ../development/python-modules/mkdocs-drawio-exporter { };
|
||||
|
||||
mkdocs-drawio-file = callPackage ../development/python-modules/mkdocs-drawio-file { };
|
||||
@@ -9291,6 +9293,8 @@ self: super: with self; {
|
||||
|
||||
mkdocs-glightbox = callPackage ../development/python-modules/mkdocs-glightbox { };
|
||||
|
||||
mkdocs-graphviz = callPackage ../development/python-modules/mkdocs-graphviz { };
|
||||
|
||||
mkdocs-jupyter = callPackage ../development/python-modules/mkdocs-jupyter { };
|
||||
|
||||
mkdocs-linkcheck = callPackage ../development/python-modules/mkdocs-linkcheck { };
|
||||
@@ -9309,6 +9313,8 @@ self: super: with self; {
|
||||
|
||||
mkdocs-minify-plugin = callPackage ../development/python-modules/mkdocs-minify-plugin { };
|
||||
|
||||
mkdocs-puml = callPackage ../development/python-modules/mkdocs-puml { };
|
||||
|
||||
mkdocs-redirects = callPackage ../development/python-modules/mkdocs-redirects { };
|
||||
|
||||
mkdocs-redoc-tag = callPackage ../development/python-modules/mkdocs-redoc-tag { };
|
||||
|
||||
Reference in New Issue
Block a user