summaryrefslogtreecommitdiff
path: root/applications/cli/gemini/bollux/default.nix
blob: c869c4876f976a7e61704db4f43bad75ad0615ff (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ pkgs, lib, ... }:
let
  bollux =
    pkgs.stdenvNoCC.mkDerivation rec {
      pname = "bollux";
      version = "0.4.1";
      nativeBuildInputs = [ pkgs.makeWrapper ];
      buildInputs = [ pkgs.bashInteractive ];
      dontBuild = true;
      makeFlags = [ "PREFIX=$(out)" ];

      src = pkgs.fetchFromGitea {
        domain = "tildegit.org";
        owner = "acdw";
        repo = "bollux";
        rev = "f472e60f1164f0dc025d06db2a13ff4e8ebee1a2";
        hash = "sha256-mo2qWCPfW+dUaYcJLsos/vR5nJ8n1eABy8Zy8OZsfVg=";
      };

      runtimeDependencies = [
        pkgs.bashInteractive
        pkgs.iconv
        pkgs.openssl
        pkgs.less
        pkgs.coreutils
      ];

      patches = [
        # https://tildegit.org/acdw/bollux/issues/13#issuecomment-9786
        ./fix_lesskey_nag.patch
      ];

      postInstall = ''
        wrapProgram $out/bin/bollux --prefix PATH : ${lib.makeBinPath runtimeDependencies}
      '';

      meta = with lib; {
        description = "a Gemini browser in like, idk, 96% pure Bash";
        homepage = "https://tildegit.org/acdw/bollux";
        license = licenses.mit;
        platforms = platforms.all;
        mainProgram = "bollux";
      };
    };
in
{
  home.packages = [
    # I'll update this later and move the above derivation to its own package
    # once I push my entire NixOS system configuration.
    # (pkgs.callPackage /path/to/pkgs/bollux.nix {
    #   src = bollux;
    # })
    bollux
  ];

  xdg.configFile."bollux/bollux.conf".text = '''';
}