From 4f665d9f4fd1b99084d72d0f8e7c4b696253c5b5 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Tue, 7 Sep 2021 09:01:08 +0300 Subject: [PATCH] termdbms: init at 2021-09-04 --- .../tools/database/termdbms/default.nix | 26 +++++++++++++++++++ .../tools/database/termdbms/viewer.patch | 12 +++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 pkgs/development/tools/database/termdbms/default.nix create mode 100644 pkgs/development/tools/database/termdbms/viewer.patch diff --git a/pkgs/development/tools/database/termdbms/default.nix b/pkgs/development/tools/database/termdbms/default.nix new file mode 100644 index 000000000000..b045669ef902 --- /dev/null +++ b/pkgs/development/tools/database/termdbms/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildGoModule }: + +buildGoModule rec { + pname = "termdbms"; + version = "unstable-2021-09-04"; + + src = fetchFromGitHub { + owner = "mathaou"; + repo = "termdbms"; + rev = "d46e72c796e8aee0def71b8e3499b0ebe5ca3385"; + sha256 = "1c3xgidhmvlcdw7v5gcqzv27cb58f1ix8sfd4r14rfz7c8kbv37v"; + }; + + vendorSha256 = "0h9aw68niizd9gs0i890g6ij13af04qgpfy1g5pskyr4ryx0gn26"; + + patches = [ ./viewer.patch ]; + + ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; + + meta = with lib; { + homepage = "https://github.com/mathaou/termdbms/"; + description = "A TUI for viewing and editing database files"; + license = licenses.mit; + maintainers = with maintainers; [ izorkin ]; + }; +} diff --git a/pkgs/development/tools/database/termdbms/viewer.patch b/pkgs/development/tools/database/termdbms/viewer.patch new file mode 100644 index 000000000000..1b95c71de46b --- /dev/null +++ b/pkgs/development/tools/database/termdbms/viewer.patch @@ -0,0 +1,12 @@ +diff --git a/viewer/viewer.go b/viewer/viewer.go +index fcf850e..b0a0f8d 100644 +--- a/viewer/viewer.go ++++ b/viewer/viewer.go +@@ -5,7 +5,6 @@ import ( + "github.com/charmbracelet/bubbles/viewport" + tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/lipgloss" +- "github.com/mattn/go-runewidth" + "math" + "runtime" + "strings" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 122658d0848d..d7cb74549992 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27801,6 +27801,8 @@ with pkgs; tendermint = callPackage ../tools/networking/tendermint { }; + termdbms = callPackage ../development/tools/database/termdbms { }; + termdown = python3Packages.callPackage ../applications/misc/termdown { }; terminal-notifier = callPackage ../applications/misc/terminal-notifier {};