package.nix (1150B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 zig_0_14, 7 scdoc, 8 installShellFiles, 9 }: 10 11 stdenv.mkDerivation (finalAttrs: { 12 pname = "gmi2html"; 13 version = "0.6.0"; 14 15 src = fetchFromGitHub { 16 owner = "shtanton"; 17 repo = "gmi2html"; 18 tag = "v${finalAttrs.version}"; 19 hash = "sha256-J71QThRwV8lpGJndqVT+tsekO+CVU8piSpjAn9jwfDI="; 20 }; 21 22 patches = [ 23 # Patch for compatability with zig 0.14.0 24 (fetchpatch { 25 url = "https://github.com/shtanton/gmi2html/pull/25/commits/29750dd364167db1b463cd5d29fc90519f293f0c.patch"; 26 hash = "sha256-Z6Go9uUINadvegrVoCLXNeLtwXLzJZs7CeiyfpdAJ1k="; 27 }) 28 ]; 29 30 nativeBuildInputs = [ 31 zig_0_14.hook 32 scdoc 33 installShellFiles 34 ]; 35 36 postBuild = '' 37 scdoc < doc/gmi2html.scdoc > doc/gmi2html.1 38 ''; 39 40 doCheck = true; 41 42 checkPhase = '' 43 sh tests/test.sh 44 ''; 45 46 postInstall = '' 47 installManPage doc/gmi2html.1 48 ''; 49 50 meta = { 51 description = "Translate text/gemini into HTML"; 52 homepage = "https://github.com/shtanton/gmi2html"; 53 license = lib.licenses.mit; 54 maintainers = [ lib.maintainers.sikmir ]; 55 platforms = lib.platforms.unix; 56 }; 57 })