From 0687f98f5e8f293c19ee4de018a4389d355c55b8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 28 Aug 2024 22:35:07 -0700 Subject: hi --- pkgs/bollux/default.nix | 42 +++++++++++++++++++++++++++++++++++++++ pkgs/bollux/fix_lesskey_nag.patch | 13 ++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 pkgs/bollux/default.nix create mode 100644 pkgs/bollux/fix_lesskey_nag.patch (limited to 'pkgs/bollux') diff --git a/pkgs/bollux/default.nix b/pkgs/bollux/default.nix new file mode 100644 index 0000000..0922592 --- /dev/null +++ b/pkgs/bollux/default.nix @@ -0,0 +1,42 @@ +{ pkgs, lib, ... }: +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="; + }; + + patches = [ + # https://tildegit.org/acdw/bollux/issues/13#issuecomment-9786 + ./fix_lesskey_nag.patch + ]; + + postInstall = '' + wrapProgram $out/bin/bollux --prefix PATH : ${ + lib.makeBinPath [ + pkgs.bashInteractive + pkgs.iconv + pkgs.openssl + pkgs.less + pkgs.coreutils + ] + } + ''; + + 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"; + }; +} diff --git a/pkgs/bollux/fix_lesskey_nag.patch b/pkgs/bollux/fix_lesskey_nag.patch new file mode 100644 index 0000000..329b886 --- /dev/null +++ b/pkgs/bollux/fix_lesskey_nag.patch @@ -0,0 +1,13 @@ +diff --git i/bollux w/bollux +index 267418e..090217e 100755 +--- i/bollux ++++ w/bollux +@@ -1130,7 +1130,7 @@ display() { # display METADATA [TITLE] + # text, and pre-formatted text shouldn't wrap. + less_cmd+=(-S) + # Load the keybindings (see `lesskey'). +- mklesskey && less_cmd+=(-k "$BOLLUX_LESSKEY") ++ mklesskey && less_cmd+=(--lesskey-src="$BOLLUX_LESSKEY") + local helpline="${KEY_OPEN}:open, " + helpline+="${KEY_GOTO}/" + helpline+="${KEY_GOTO_FROM}:goto, " -- cgit v1.2.3