nur-packages

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

default.nix (972B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   zig_0_11,
      6   scdoc,
      7   installShellFiles,
      8 }:
      9 
     10 stdenv.mkDerivation (finalAttrs: {
     11   pname = "gmi2html";
     12   version = "0.6.0";
     13 
     14   src = fetchFromGitHub {
     15     owner = "shtanton";
     16     repo = "gmi2html";
     17     rev = "v${finalAttrs.version}";
     18     hash = "sha256-J71QThRwV8lpGJndqVT+tsekO+CVU8piSpjAn9jwfDI=";
     19   };
     20 
     21   nativeBuildInputs = [
     22     zig_0_11
     23     scdoc
     24     installShellFiles
     25   ];
     26 
     27   buildPhase = ''
     28     export HOME=$TMPDIR
     29     zig build -Doptimize=ReleaseSmall -Dcpu=baseline
     30     scdoc < doc/gmi2html.scdoc > doc/gmi2html.1
     31   '';
     32 
     33   doCheck = true;
     34 
     35   checkPhase = ''
     36     sh tests/test.sh
     37   '';
     38 
     39   installPhase = ''
     40     zig build --prefix $out install
     41     installManPage doc/gmi2html.1
     42   '';
     43 
     44   meta = {
     45     description = "Translate text/gemini into HTML";
     46     homepage = "https://github.com/shtanton/gmi2html";
     47     license = lib.licenses.mit;
     48     maintainers = [ lib.maintainers.sikmir ];
     49     platforms = lib.platforms.unix;
     50   };
     51 })