nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 2ce6fd8a074720e8cbf835c1caac4e205eeedb65
parent 292a689604fe9f226aa1bdd993443b9654729400
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Tue,  9 Feb 2021 18:46:57 +0300

Add gmi2html

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/gemini/gmi2html/default.nix | 35+++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -205,6 +205,7 @@ lib.makeScope newScope ( geminid = callPackage ./gemini/geminid { }; gloggery = callPackage ./gemini/gloggery { }; + gmi2html = callPackage ./gemini/gmi2html { }; gmni = callPackage ./gemini/gmni { }; gmnisrv = callPackage ./gemini/gmnisrv { }; gurl = callPackage ./gemini/gurl { }; diff --git a/pkgs/gemini/gmi2html/default.nix b/pkgs/gemini/gmi2html/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchFromGitHub, scdoc, zig }: + +stdenv.mkDerivation rec { + pname = "gmi2html"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "shtanton"; + repo = "gmi2html"; + rev = "v${version}"; + sha256 = "1nfl0cy99mm2rk9v0g43370i4rnz26hg9ryl0gkm5d1v2sg2i4al"; + }; + + nativeBuildInputs = [ scdoc zig ]; + + preConfigure = "HOME=$TMP"; + + buildPhase = '' + zig build -Drelease-safe + scdoc < doc/gmi2html.scdoc > doc/gmi2html.1 + ''; + + installPhase = '' + zig build --prefix $out install + install -Dm644 doc/gmi2html.1 -t $out/share/man/man1 + ''; + + meta = with lib; { + description = "Translate text/gemini into HTML"; + homepage = "https://github.com/shtanton/gmi2html"; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}