From b894bc516d9ecaeb99af31927d5849af1ca4d6e5 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 26 Jan 2024 22:26:05 -0500 Subject: [PATCH] Update `cmark` source code so we can parser into an existing AST MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed until https://github.com/commonmark/cmark/pull/524 is released. • Added input 'cmark': 'github:commonmark/cmark/cd37711b8a08da67ba4e21a42614b86dd8def929' (2024-01-26) --- flake.lock | 17 +++++++++++++++++ flake.nix | 10 +++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/flake.lock b/flake.lock index bb2e400c0a9..314ca44d814 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "cmark": { + "flake": false, + "locked": { + "lastModified": 1706295831, + "narHash": "sha256-nEI85W8w49ZVr17ycO+7aZvcgA3U2QphNZGrfQl2mSk=", + "owner": "commonmark", + "repo": "cmark", + "rev": "cd37711b8a08da67ba4e21a42614b86dd8def929", + "type": "github" + }, + "original": { + "owner": "commonmark", + "repo": "cmark", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -66,6 +82,7 @@ }, "root": { "inputs": { + "cmark": "cmark", "flake-compat": "flake-compat", "libgit2": "libgit2", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 453d144ff2a..c34d551e54b 100644 --- a/flake.nix +++ b/flake.nix @@ -7,8 +7,10 @@ inputs.nixpkgs-regression.url = "github:NixOS/nixpkgs/215d4d0fd80ca5163643b03a33fde804a29cc1e2"; inputs.flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; inputs.libgit2 = { url = "github:libgit2/libgit2"; flake = false; }; + # Until https://github.com/commonmark/cmark/pull/524 is released + inputs.cmark = { url = "github:commonmark/cmark"; flake = false; }; - outputs = { self, nixpkgs, nixpkgs-regression, libgit2, ... }: + outputs = { self, nixpkgs, nixpkgs-regression, libgit2, cmark, ... }: let inherit (nixpkgs) lib; @@ -143,6 +145,11 @@ ''; }; + cmark-nix = final.cmark.overrideAttrs (_: { + src = cmark; + version = cmark.lastModifiedDate; + }); + libgit2-nix = final.libgit2.overrideAttrs (attrs: { src = libgit2; version = libgit2.lastModifiedDate; @@ -179,6 +186,7 @@ ; officialRelease = false; boehmgc = final.boehmgc-nix; + cmark = final.cmark-nix; libgit2 = final.libgit2-nix; busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell; } // {