From 2bac7dadb5c15d24b8caf19a07df239403ad2125 Mon Sep 17 00:00:00 2001 From: Winter Date: Thu, 25 Jul 2024 17:43:17 -0700 Subject: [PATCH] moved cmark into main flake --- cmark.nix | 22 ---------------------- flake.nix | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 30 deletions(-) delete mode 100644 cmark.nix diff --git a/cmark.nix b/cmark.nix deleted file mode 100644 index daeeb04..0000000 --- a/cmark.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ buildLuarocksPackage, fetchFromGitHub, fetchurl }: -buildLuarocksPackage { - pname = "cmark"; - version = "0.30.2-1"; - knownRockspec = (fetchurl { - url = "mirror://luarocks/cmark-0.30.2-1.rockspec"; - sha256 = "077kvl9xa9yj0fxyyxxw43k9v9dgd5f11ax8hhxj3nx8vfs5rps8"; - }).outPath; - src = fetchFromGitHub { - owner = "jgm"; - repo = "cmark-lua"; - rev = "0.30.2"; - hash = "sha256-6Bzq0FdyqXXiL6pLDRFbULFJpowF0P6CvAw8iqFXkkQ="; - }; - - meta = { - homepage = "https://github.com/jgm/cmark-lua"; - description = "Lua wrapper for libcmark, CommonMark Markdown parsing\ - and rendering library"; - license.fullName = "BSD2"; - }; -} diff --git a/flake.nix b/flake.nix index 1a4aba6..db7d49b 100644 --- a/flake.nix +++ b/flake.nix @@ -11,14 +11,22 @@ devShells.x86_64-linux.default = pkgs.mkShell { buildInputs = [ (pkgs.lua5_1.withPackages (ps: with ps; [ - ( - let - buildLuarocksPackage = ps.buildLuarocksPackage; - in - pkgs.callPackage ./cmark.nix { - inherit buildLuarocksPackage; - } - ) + ({ fetchFromGitHub, fetchurl }: + ps.buildLuarocksPackage { + pname = "cmark"; + version = "0.30.2-1"; + knownRockspec = (fetchurl { + url = "mirror://luarocks/cmark-0.30.2-1.rockspec"; + sha256 = "077kvl9xa9yj0fxyyxxw43k9v9dgd5f11ax8hhxj3nx8vfs5rps8"; + }).outPath; + + src = fetchFromGitHub { + owner = "jgm"; + repo = "cmark-lua"; + rev = "0.30.2"; + hash = "sha256-6Bzq0FdyqXXiL6pLDRFbULFJpowF0P6CvAw8iqFXkkQ="; + }; + }) luafilesystem luasocket luasec