devenv: apply mdbook 0.5 support patch to devenv_nix

Apply the mdbook 0.5 support patch to devenv's bundled Nix 2.30.4.

The patch is from upstream Nix commit 5cbd7856, which maintains
compatibility with both mdbook 0.4.x and 0.5.x. The doc/manual/package.nix
file is excluded as it doesn't exist in cachix's Nix fork.

https://github.com/NixOS/nix/issues/14628
This commit is contained in:
Robert Hensing
2025-12-18 00:29:33 +01:00
parent 5cd20ff81d
commit 2ce35ff13f
+21 -9
View File
@@ -1,6 +1,7 @@
{
lib,
fetchFromGitHub,
fetchpatch2,
gitMinimal,
makeBinaryWrapper,
installShellFiles,
@@ -20,16 +21,27 @@ let
devenvNixVersion = "2.30.4";
devenv_nix =
let
components =
(nixVersions.nixComponents_git.override { version = devenvNixVersion; }).overrideSource
(fetchFromGitHub {
owner = "cachix";
repo = "nix";
rev = "devenv-${devenvNixVersion}";
hash = "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=";
});
in
(
(nixVersions.nixComponents_git.override { version = devenvNixVersion; })
.nix-everything.overrideSource
(fetchFromGitHub {
owner = "cachix";
repo = "nix";
rev = "devenv-${devenvNixVersion}";
hash = "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=";
})
).overrideAttrs
# Support for mdbook >= 0.5, https://github.com/NixOS/nix/issues/14628
components.appendPatches [
(fetchpatch2 {
name = "nix-2.30-14695-mdbook-0.5-support.patch";
url = "https://github.com/NixOS/nix/commit/5cbd7856de0a9c13351f98e32a1e26d0854d87fd.patch";
excludes = [ "doc/manual/package.nix" ];
hash = "sha256-GYaTOG9wZT9UI4G6za535PkLyjHKSxwBjJsXbjmI26g=";
})
]
).nix-everything.overrideAttrs
(old: {
pname = "devenv-nix";
version = devenvNixVersion;