commit 29b309e1861d85a057961be27d83a8081288b873
parent 8cdae9807faf618a223102fd5986ecb34374fcee
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 18 Jan 2021 09:33:27 +0300
Add md2gemini
Diffstat:
3 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -707,6 +707,20 @@
"url_template": "https://maptourist.org/osm-garmin/archive/OSM-MapTourist-<region>-RU_<version>.zip",
"version": "2021-01-15"
},
+ "md2gemini": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2020-12-14T20:05:33Z",
+ "description": "File converter from Markdown to Gemini",
+ "homepage": "https://github.com/makeworld-the-better-one/md2gemini",
+ "owner": "makeworld-the-better-one",
+ "repo": "md2gemini",
+ "rev": "c83ad7f9b22407154556625ea2d1c3b89890f04a",
+ "sha256": "156k0caqmmsypqiirmxsn22ddk6rz8wcxzkw0jrdwszv78ai750y",
+ "type": "tarball",
+ "url": "https://github.com/makeworld-the-better-one/md2gemini/archive/c83ad7f9b22407154556625ea2d1c3b89890f04a.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"mercantile": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -187,6 +187,7 @@ lib.makeScope newScope (
lel = callPackage ./tools/graphics/lel { };
lsdreader = callPackage ./tools/dict/lsdreader { };
map-tiler = callPackage ./tools/geo/map-tiler { };
+ md2gemini = callPackage ./tools/text/md2gemini { };
morse-talk = callPackage ./tools/morse-talk { };
musig = callPackage ./tools/audio/musig { };
ocad2img = perlPackages.callPackage ./tools/geo/ocad2img {
diff --git a/pkgs/tools/text/md2gemini/default.nix b/pkgs/tools/text/md2gemini/default.nix
@@ -0,0 +1,30 @@
+{ lib, python3Packages, sources, cjkwrap }:
+
+python3Packages.buildPythonApplication {
+ pname = "md2gemini-unstable";
+ version = lib.substring 0 10 sources.md2gemini.date;
+
+ src = sources.md2gemini;
+
+ propagatedBuildInputs = with python3Packages; [
+ (mistune.overrideAttrs (old: rec {
+ pname = "mistune";
+ version = "2.0.0a6";
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "1jaf4dksxywaprc9svazhxsknjj15hxxji2xsbfx435mdyqwnisp";
+ };
+ }))
+ cjkwrap
+ wcwidth
+ ];
+
+ checkInputs = with python3Packages; [ pytestCheckHook ];
+
+ meta = with lib; {
+ inherit (sources.md2gemini) description homepage;
+ license = licenses.lgpl3Only;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}