From fa32bb007be2099f045c365248764ed736d35f48 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Fri, 12 Jan 2024 22:33:42 +0530 Subject: [PATCH] nix: Update nixpkgs, flake-parts, haskell-flake This also brings a new commonmark-* withi 'alerts' parser --- emanote/emanote.cabal | 4 +- .../src/Emanote/Pandoc/Renderer/Callout.hs | 4 ++ flake.lock | 41 +++++++++++++------ flake.nix | 9 +++- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/emanote/emanote.cabal b/emanote/emanote.cabal index e3dfe05ee..f0af334bb 100644 --- a/emanote/emanote.cabal +++ b/emanote/emanote.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: emanote -version: 1.3.6.0 +version: 1.3.6.1 license: AGPL-3.0-only copyright: 2022 Sridhar Ratnakumar maintainer: srid@srid.ca @@ -100,7 +100,7 @@ common library-common , commonmark , commonmark-extensions >=0.2.3.4 , commonmark-pandoc - , commonmark-simple + , commonmark-simple >=0.2 , commonmark-wikilink , containers , data-default diff --git a/emanote/src/Emanote/Pandoc/Renderer/Callout.hs b/emanote/src/Emanote/Pandoc/Renderer/Callout.hs index 2a117bb5e..fc91b099c 100644 --- a/emanote/src/Emanote/Pandoc/Renderer/Callout.hs +++ b/emanote/src/Emanote/Pandoc/Renderer/Callout.hs @@ -1,5 +1,9 @@ {-# LANGUAGE RecordWildCards #-} +{- | Obsidian-style callouts + + TODO: Should we switch to using the commonmark-hs parser here? cf. https://github.com/jgm/commonmark-hs/pull/135 +-} module Emanote.Pandoc.Renderer.Callout ( calloutResolvingSplice, diff --git a/flake.lock b/flake.lock index 969dfefca..290c85fd4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "commonmark-simple": { + "flake": false, + "locked": { + "lastModified": 1705078713, + "narHash": "sha256-YgDHJG8M47ZXGLWu8o7MhXbIrgQ0Ai32Gr8nKvZGGw8=", + "owner": "srid", + "repo": "commonmark-simple", + "rev": "fc106c94f781f6a35ef66900880edc08cbe3b034", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "commonmark-simple", + "type": "github" + } + }, "ema": { "inputs": { "flake-parts": [ @@ -54,11 +70,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1693611461, - "narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", + "lastModified": 1704982712, + "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", + "rev": "07f6395285469419cf9d078f59b5b49993198c00", "type": "github" }, "original": { @@ -84,11 +100,11 @@ }, "haskell-flake": { "locked": { - "lastModified": 1692741689, - "narHash": "sha256-CbNpheNJMTM9Wz5iTzdXmMtvfH9KvH/jNfv6N9roaqs=", + "lastModified": 1705067885, + "narHash": "sha256-al2JqNIkXfLiVreqSJWly64Z6YVNphWBh4m3IxGIdYI=", "owner": "srid", "repo": "haskell-flake", - "rev": "c8622c8a259e18e0a1919462ce885380108a723c", + "rev": "8a526aaf98cde6af6b2d1d368e9acb460ee34547", "type": "github" }, "original": { @@ -115,11 +131,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702900294, - "narHash": "sha256-pt7sSoJYNw3n8YtXw0Z/Nnr6/PfY2YrjDvqboErXnRM=", + "lastModified": 1704842529, + "narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "886c9aee6ca9324e127f9c2c4e6f68c2641c8256", + "rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5", "type": "github" }, "original": { @@ -132,11 +148,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1693471703, - "narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", "type": "github" }, "original": { @@ -149,6 +165,7 @@ }, "root": { "inputs": { + "commonmark-simple": "commonmark-simple", "ema": "ema", "emanote-template": "emanote-template", "flake-parts": "flake-parts", diff --git a/flake.nix b/flake.nix index da5381b58..f39caa88f 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,9 @@ unionmount.url = "github:srid/unionmount"; unionmount.flake = false; + commonmark-simple.url = "github:srid/commonmark-simple"; + commonmark-simple.flake = false; + emanote-template.url = "github:srid/emanote-template"; emanote-template.flake = false; }; @@ -66,13 +69,15 @@ packages = { unionmount.source = inputs.unionmount; + commonmark-simple.source = inputs.commonmark-simple; fsnotify.source = "0.4.1.0"; # Not in nixpkgs, yet. ghcid.source = "0.8.8"; heist-extra.source = inputs.heist-extra; }; settings = { - # TODO: Eliminate these after new emanote gets upstreamed to nixpkgs + # Haskell packages in nixpkgs are often broken in many ways; ergo, + # it is our responsibility to fix them here. fsnotify.check = false; heist.broken = false; ixset-typed.broken = false; @@ -94,7 +99,7 @@ justStaticExecutables = true; removeReferencesTo = [ self.pandoc - self.pandoc_3_1_9 + self.pandoc_3_1_11 self.pandoc-types self.warp ];