about summary refs log tree commit diff
path: root/pkgs/html2gmi/default.nix
blob: 57b18020548ff1cc69da7bff7f7edc434227052b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, lib, fetchFromGitHub, buildGoModule }:
with lib;

let
  pname = "html2gmi";
  version = "unstable-15-11-2020";
in
buildGoModule {
  inherit pname version;

  src = fetchFromGitHub {
    owner = "LukeEmmet";
    repo = pname;
    rev = "928eec33eeabae7443d5a6abcbfbfbc9f95ebe8a";
    sha256 = "0v8hys174nrqjn1xwc2ij097hijpbkad0hx2w1l2mngfkgi0liwb";
  };

  vendorSha256 = "016cgpa5z1l1pn3f80r2sl0sxwsnrvychsbfcr2hvb9qi1lm0wkl";

  buildPhase = ''
    go build -o html2gmi
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp html2gmi $out/bin
  '';

  meta = {
    description = "A command line application to convert HTML to GMI (Gemini text/gemini)";
    homepage = "https://github.com/LukeEmmet/html2gmi";
    license = "MIT";
    platforms = platforms.linux;
  };
}