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