Skip to content

Commit 8e38f10

Browse files
authored
mdbook: 0.4.52 -> 0.5.1 (#467009)
2 parents 0d0b968 + bcbe96f commit 8e38f10

9 files changed

Lines changed: 173 additions & 68 deletions

File tree

pkgs/by-name/de/devenv/package.nix

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
lib,
33
fetchFromGitHub,
4+
fetchpatch2,
45
gitMinimal,
56
makeBinaryWrapper,
67
installShellFiles,
@@ -20,16 +21,27 @@ let
2021
devenvNixVersion = "2.30.4";
2122

2223
devenv_nix =
24+
let
25+
components =
26+
(nixVersions.nixComponents_git.override { version = devenvNixVersion; }).overrideSource
27+
(fetchFromGitHub {
28+
owner = "cachix";
29+
repo = "nix";
30+
rev = "devenv-${devenvNixVersion}";
31+
hash = "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=";
32+
});
33+
in
2334
(
24-
(nixVersions.nixComponents_git.override { version = devenvNixVersion; })
25-
.nix-everything.overrideSource
26-
(fetchFromGitHub {
27-
owner = "cachix";
28-
repo = "nix";
29-
rev = "devenv-${devenvNixVersion}";
30-
hash = "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=";
31-
})
32-
).overrideAttrs
35+
# Support for mdbook >= 0.5, https://github.com/NixOS/nix/issues/14628
36+
components.appendPatches [
37+
(fetchpatch2 {
38+
name = "nix-2.30-14695-mdbook-0.5-support.patch";
39+
url = "https://github.com/NixOS/nix/commit/5cbd7856de0a9c13351f98e32a1e26d0854d87fd.patch";
40+
excludes = [ "doc/manual/package.nix" ];
41+
hash = "sha256-GYaTOG9wZT9UI4G6za535PkLyjHKSxwBjJsXbjmI26g=";
42+
})
43+
]
44+
).nix-everything.overrideAttrs
3345
(old: {
3446
pname = "devenv-nix";
3547
version = devenvNixVersion;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- a/book.toml
2+
+++ b/book.toml
3+
@@ -1,6 +1,5 @@
4+
[book]
5+
language = "en"
6+
-multilingual = false
7+
src = "book"
8+
title = "Engage"
9+
10+
@@ -8,5 +7,5 @@ build-dir = "public"
11+
12+
[output.html]
13+
-git-repository-icon = "fa-git-square"
14+
+git-repository-icon = "fab-square-git"
15+
git-repository-url = "https://gitlab.computer.surgery/charles/engage"
16+

pkgs/by-name/en/engage/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
2828
hash = "sha256-n7ypFJBYT712Uzh1NnWWSOIpEDKR0e6sQxbiIN6pZgo=";
2929
};
3030

31+
patches = [
32+
# Support mdbook 0.5.x - remove deprecated multilingual field
33+
./mdbook-0.5-support.patch
34+
];
35+
3136
cargoHash = "sha256-UTIxxPBtxzsZilxriAT8ksl2ovoDzIhB+8f+b2cGN3k=";
3237

3338
nativeBuildInputs = [
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/helix-term/src/commands.rs
2+
+++ b/helix-term/src/commands.rs
3+
@@ -424,9 +424,9 @@ impl MappableCommand {
4+
add_newline_below, "Add newline below",
5+
goto_type_definition, "Goto type definition",
6+
goto_implementation, "Goto implementation",
7+
- goto_file_start, "Goto line number <n> else file start",
8+
+ goto_file_start, "Goto line number &lt;n&gt; else file start",
9+
goto_file_end, "Goto file end",
10+
- extend_to_file_start, "Extend to line number<n> else file start",
11+
+ extend_to_file_start, "Extend to line number &lt;n&gt; else file start",
12+
extend_to_file_end, "Extend to file end",
13+
goto_file, "Goto files/URLs in selections",
14+
goto_file_hsplit, "Goto files in selections (hsplit)",

pkgs/by-name/he/helix/package.nix

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
fetchzip,
3+
fetchpatch,
34
lib,
45
rustPlatform,
56
mdbook,
@@ -25,6 +26,17 @@ rustPlatform.buildRustPackage (final: {
2526
stripRoot = false;
2627
};
2728

29+
patches = [
30+
# Support mdbook 0.5.x: escape HTML tags in command descriptions
31+
./mdbook-0.5-support.patch
32+
];
33+
34+
postPatch = ''
35+
# mdbook 0.5 uses asset hashing for CSS/JS files
36+
# Remove custom theme to use default mdbook theme with correct asset references
37+
rm -f book/theme/index.hbs
38+
'';
39+
2840
cargoHash = "sha256-Mf0nrgMk1MlZkSyUN6mlM5lmTcrOHn3xBNzmVGtApEU=";
2941

3042
nativeBuildInputs = [
@@ -49,7 +61,7 @@ rustPlatform.buildRustPackage (final: {
4961
mkdir -p $out/share/{applications,icons/hicolor/256x256/apps}
5062
cp contrib/Helix.desktop $out/share/applications
5163
cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
52-
cp -r book-html $doc/share/doc/$name
64+
cp -r ../book-html $doc/share/doc/$name
5365
'';
5466

5567
nativeInstallCheckInputs = [

pkgs/by-name/md/mdbook-cmdrun/package.nix

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010

1111
rustPlatform.buildRustPackage {
1212
pname = "mdbook-cmdrun";
13-
version = "0.6.0-unstable-2024-04-15";
13+
version = "0.7.3-unstable-2025-12-22";
1414

15+
# mdbook 0.5 upgrade: https://github.com/FauconFan/mdbook-cmdrun/pull/23
1516
src = fetchFromGitHub {
16-
owner = "FauconFan";
17+
owner = "roberth";
1718
repo = "mdbook-cmdrun";
18-
rev = "d1fef67f100563c2a433b1f5dd5a71810db6b90d";
19-
hash = "sha256-Q2h64XCyDxLmmCNC3wTw81pBotaMEUjY5y0Oq6q20cQ=";
19+
rev = "3947c797d063352e0f983311c078430215cc1cca";
20+
hash = "sha256-0RkyMJ8tsnGcSD0ksGTGAyliH6AihVl0HEesljEmTH8=";
2021
};
2122

2223
nativeCheckInputs = [
@@ -26,7 +27,7 @@ rustPlatform.buildRustPackage {
2627
util-linux # used by tests/regression/shell/input.md
2728
];
2829

29-
cargoHash = "sha256-C3Rg+WXHBA7KyUDFdhBz4mOm8CFH/f7UVA8KOLs9ClE=";
30+
cargoHash = "sha256-oUlH+z50a1FtzDADXfGKSYjauZGTok0bVMq718HLglY=";
3031

3132
meta = {
3233
description = "mdbook preprocessor to run arbitrary commands";

pkgs/by-name/md/mdbook/package.nix

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
installShellFiles,
99
}:
1010
let
11-
version = "0.4.52";
11+
version = "0.5.1";
1212
in
1313
rustPlatform.buildRustPackage rec {
1414
inherit version;
@@ -18,18 +18,10 @@ rustPlatform.buildRustPackage rec {
1818
owner = "rust-lang";
1919
repo = "mdBook";
2020
tag = "v${version}";
21-
hash = "sha256-a3GSMz1+8Ve5cp4x1NjBlsCU/wMC4Jl3/H9qx7+1XlI=";
21+
hash = "sha256-t7Qou3H6dlO97puWQGkPlyb0jjpGoYCrz041iZWWL/s=";
2222
};
2323

24-
cargoHash = "sha256-wvTixSVHXglJM+nBMulZNZKF8pZfNd2G8Z+1PlAWmpk=";
25-
26-
patches = [
27-
(fetchpatch2 {
28-
name = "fix-rust-1.91-tests.patch";
29-
url = "https://github.com/rust-lang/mdBook/commit/841c68d05e763b031524a2b4d679f033cd15e64c.patch?full_index=1";
30-
hash = "sha256-KDQhmFX2TWamtdyssFL69MP3vg9LABb+bF8/7vaFsew=";
31-
})
32-
];
24+
cargoHash = "sha256-bJr0u025syrP/LGgIbXD0mRvQrvnnOntiaAfr/9tQ90=";
3325

3426
nativeBuildInputs = [ installShellFiles ];
3527

pkgs/tools/package-management/lix/default.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
confDir ? "/etc",
3131
}:
3232
let
33+
# Support for mdbook >= 0.5, https://git.lix.systems/lix-project/lix/issues/1051
34+
lixMdbookPatch = fetchpatch2 {
35+
name = "lix-mdbook-0.5-support.patch";
36+
url = "https://git.lix.systems/lix-project/lix/commit/54df89f601b3b4502a5c99173c9563495265d7e7.patch";
37+
excludes = [ "package.nix" ];
38+
hash = "sha256-uu/SIG8fgVVWhsGxmszTPHwe4SQtLgbxdShOMKbeg2w=";
39+
};
40+
3341
makeLixScope =
3442
{
3543
attrName,
@@ -214,6 +222,8 @@ lib.makeExtensible (
214222
url = "https://git.lix.systems/lix-project/lix/commit/b6d5670bcffebdd43352ea79b36135e35a8148d9.patch";
215223
hash = "sha256-f4s0TR5MhNMNM5TYLOR7K2/1rtZ389KDjTCKFVK0OcE=";
216224
})
225+
226+
lixMdbookPatch
217227
];
218228
};
219229
};
@@ -237,6 +247,8 @@ lib.makeExtensible (
237247
inherit src;
238248
hash = "sha256-APm8m6SVEAO17BBCka13u85/87Bj+LePP7Y3zHA3Mpg=";
239249
};
250+
251+
patches = [ lixMdbookPatch ];
240252
};
241253
};
242254

@@ -259,6 +271,8 @@ lib.makeExtensible (
259271
inherit src;
260272
hash = "sha256-APm8m6SVEAO17BBCka13u85/87Bj+LePP7Y3zHA3Mpg=";
261273
};
274+
275+
patches = [ lixMdbookPatch ];
262276
};
263277
};
264278

pkgs/tools/package-management/nix/default.nix

Lines changed: 81 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -136,33 +136,56 @@ lib.makeExtensible (
136136
version = "2.28.5";
137137
hash = "sha256-oIfAHxO+BCtHXJXLHBnsKkGl1Pw+Uuq1PwNxl+lZ+Oc=";
138138
self_attribute_name = "nix_2_28";
139+
patches = [
140+
(fetchpatch2 {
141+
name = "nix-2.28-14764-mdbook-0.5-support.patch";
142+
url = "https://github.com/NixOS/nix/commit/5a64138e862fe364e751c5c286e8db8c466aaee7.patch";
143+
hash = "sha256-K5TNroqSRH9j7vSzWw/6/b19mu7q+J5XPTDvJ3xVWlE=";
144+
})
145+
];
139146
};
140147

141-
nixComponents_2_29 = nixDependencies.callPackage ./modular/packages.nix rec {
142-
version = "2.29.2";
143-
inherit maintainers teams;
144-
otherSplices = generateSplicesForNixComponents "nixComponents_2_29";
145-
src = fetchFromGitHub {
146-
owner = "NixOS";
147-
repo = "nix";
148-
tag = version;
149-
hash = "sha256-50p2sG2RFuRnlS1/Vr5et0Rt+QDgfpNE2C2WWRztnbQ=";
150-
};
151-
};
148+
nixComponents_2_29 =
149+
(nixDependencies.callPackage ./modular/packages.nix rec {
150+
version = "2.29.2";
151+
inherit maintainers teams;
152+
otherSplices = generateSplicesForNixComponents "nixComponents_2_29";
153+
src = fetchFromGitHub {
154+
owner = "NixOS";
155+
repo = "nix";
156+
tag = version;
157+
hash = "sha256-50p2sG2RFuRnlS1/Vr5et0Rt+QDgfpNE2C2WWRztnbQ=";
158+
};
159+
}).appendPatches
160+
[
161+
(fetchpatch2 {
162+
name = "nix-2.29-14763-mdbook-0.5-support.patch";
163+
url = "https://github.com/NixOS/nix/commit/0501ae1e4965549cbf1314e471f92f4226e46ef1.patch";
164+
hash = "sha256-w8WQfWxMtprDLoZUhrCm4zr6xZXKhoIirq3la0Y7/wU=";
165+
})
166+
];
152167

153168
nix_2_29 = addTests "nix_2_29" self.nixComponents_2_29.nix-everything;
154169

155-
nixComponents_2_30 = nixDependencies.callPackage ./modular/packages.nix rec {
156-
version = "2.30.3";
157-
inherit maintainers teams;
158-
otherSplices = generateSplicesForNixComponents "nixComponents_2_30";
159-
src = fetchFromGitHub {
160-
owner = "NixOS";
161-
repo = "nix";
162-
tag = version;
163-
hash = "sha256-kBuwzMgIE9Tmve0Rpp+q+YCsE2mw9d62M/950ViWeJ0=";
164-
};
165-
};
170+
nixComponents_2_30 =
171+
(nixDependencies.callPackage ./modular/packages.nix rec {
172+
version = "2.30.3";
173+
inherit maintainers teams;
174+
otherSplices = generateSplicesForNixComponents "nixComponents_2_30";
175+
src = fetchFromGitHub {
176+
owner = "NixOS";
177+
repo = "nix";
178+
tag = version;
179+
hash = "sha256-kBuwzMgIE9Tmve0Rpp+q+YCsE2mw9d62M/950ViWeJ0=";
180+
};
181+
}).appendPatches
182+
[
183+
(fetchpatch2 {
184+
name = "nix-2.30-14695-mdbook-0.5-support.patch";
185+
url = "https://github.com/NixOS/nix/commit/5cbd7856de0a9c13351f98e32a1e26d0854d87fd.patch";
186+
hash = "sha256-w8WQfWxMtprDLoZUhrCm4zr6xZXKhoIirq3la0Y7/wU=";
187+
})
188+
];
166189

167190
nix_2_30 = addTests "nix_2_30" self.nixComponents_2_30.nix-everything;
168191

@@ -179,39 +202,55 @@ lib.makeExtensible (
179202
};
180203
}).appendPatches
181204
(
182-
# issues on darwin: https://github.com/NixOS/nixpkgs/pull/468208#issuecomment-3626314109
183-
lib.optional stdenv.isLinux (fetchpatch2 {
184-
name = "nix-2.31-14240-sri-error-message.patch";
185-
url = "https://github.com/NixOS/nix/commit/56751b1cd2c4700c71c545f2246adf602c97fdf5.patch";
186-
hash = "sha256-CerSBAI+H2RqPp9jsCP0QIM2rZYx3yBZHVVUAztgc18=";
187-
})
205+
[
206+
(fetchpatch2 {
207+
name = "nix-2.31-14692-mdbook-0.5-support.patch";
208+
url = "https://github.com/NixOS/nix/commit/a4f5f365090980a6eeb2ef483e49c04bdefd71a8.patch";
209+
hash = "sha256-GOWZtHSzHovnD8iUknr61bo7y85i0BKdw3kVBGDfBX0=";
210+
})
211+
]
212+
++
213+
# issues on darwin: https://github.com/NixOS/nixpkgs/pull/468208#issuecomment-3626314109
214+
lib.optional stdenv.isLinux (fetchpatch2 {
215+
name = "nix-2.31-14240-sri-error-message.patch";
216+
url = "https://github.com/NixOS/nix/commit/56751b1cd2c4700c71c545f2246adf602c97fdf5.patch";
217+
hash = "sha256-CerSBAI+H2RqPp9jsCP0QIM2rZYx3yBZHVVUAztgc18=";
218+
})
188219
);
189220

190221
nix_2_31 = addTests "nix_2_31" self.nixComponents_2_31.nix-everything;
191222

192-
nixComponents_2_32 = nixDependencies.callPackage ./modular/packages.nix rec {
193-
version = "2.32.4";
194-
inherit (self.nix_2_31.meta) maintainers teams;
195-
otherSplices = generateSplicesForNixComponents "nixComponents_2_32";
196-
src = fetchFromGitHub {
197-
owner = "NixOS";
198-
repo = "nix";
199-
tag = version;
200-
hash = "sha256-8QYnRyGOTm3h/Dp8I6HCmQzlO7C009Odqyp28pTWgcY=";
201-
};
202-
};
223+
nixComponents_2_32 =
224+
(nixDependencies.callPackage ./modular/packages.nix rec {
225+
version = "2.32.4";
226+
inherit (self.nix_2_31.meta) maintainers teams;
227+
otherSplices = generateSplicesForNixComponents "nixComponents_2_32";
228+
src = fetchFromGitHub {
229+
owner = "NixOS";
230+
repo = "nix";
231+
tag = version;
232+
hash = "sha256-8QYnRyGOTm3h/Dp8I6HCmQzlO7C009Odqyp28pTWgcY=";
233+
};
234+
}).appendPatches
235+
[
236+
(fetchpatch2 {
237+
name = "nix-2.32-14693-mdbook-0.5-support.patch";
238+
url = "https://github.com/NixOS/nix/commit/ba5bede9f51f126b29aaa01a3170da281cef0231.patch";
239+
hash = "sha256-jY5fWnJSBfHRmB0RnBKeu3aYQ8wmDKYVqTj85cWVZRA=";
240+
})
241+
];
203242

204243
nix_2_32 = addTests "nix_2_32" self.nixComponents_2_32.nix-everything;
205244

206245
nixComponents_git = nixDependencies.callPackage ./modular/packages.nix rec {
207-
version = "2.33pre20251107_${lib.substring 0 8 src.rev}";
246+
version = "2.34pre20251217_${lib.substring 0 8 src.rev}";
208247
inherit maintainers teams;
209248
otherSplices = generateSplicesForNixComponents "nixComponents_git";
210249
src = fetchFromGitHub {
211250
owner = "NixOS";
212251
repo = "nix";
213-
rev = "479b6b73a9576452c14ca66b7f3cd4873969077e";
214-
hash = "sha256-eBjgsauQXFz2yeiNoPEzgkf7uyV+S8HYCQgZhPVx/9I=";
252+
rev = "b6add8dcc6f4f6feb1ce83aaffe4d7e660e6f616";
253+
hash = "sha256-2au7PdQ4HXSuktTPCtOJoD/LNjqMwbHIJmuzEYW1b7I=";
215254
};
216255
};
217256

0 commit comments

Comments
 (0)