From 2ce35ff13f7bc48b421eadf94d12cf055e000383 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 17 Dec 2025 23:59:36 +0100 Subject: [PATCH] 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 --- pkgs/by-name/de/devenv/package.nix | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/de/devenv/package.nix b/pkgs/by-name/de/devenv/package.nix index 1d9633ccf52e..6fe3cacc41ca 100644 --- a/pkgs/by-name/de/devenv/package.nix +++ b/pkgs/by-name/de/devenv/package.nix @@ -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;