diff options
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/git-helpers/default.nix | 24 | ||||
| -rw-r--r-- | pkgs/hgrep/default.nix | 56 | ||||
| -rw-r--r-- | pkgs/reparojson/default.nix | 25 | ||||
| -rw-r--r-- | pkgs/term-banner/default.nix | 25 | ||||
| -rw-r--r-- | pkgs/term-clock/default.nix | 38 |
5 files changed, 168 insertions, 0 deletions
diff --git a/pkgs/git-helpers/default.nix b/pkgs/git-helpers/default.nix new file mode 100644 index 0000000..94b4121 --- /dev/null +++ b/pkgs/git-helpers/default.nix @@ -0,0 +1,24 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "git-helpers"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "nsfisis"; + repo = "git-helpers"; + rev = "v${version}"; + hash = "sha256-iK3P91PwKgQz4WIQBJVGjDP65dZSB0LL/NGItMj/wzQ="; + }; + vendorHash = null; + + meta = { + description = "My git helpers"; + homepage = "https://github.com/nsfisis/git-helpers"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/hgrep/default.nix b/pkgs/hgrep/default.nix new file mode 100644 index 0000000..004041e --- /dev/null +++ b/pkgs/hgrep/default.nix @@ -0,0 +1,56 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + installShellFiles, +}: + +rustPlatform.buildRustPackage rec { + pname = "hgrep"; + version = "0.3.8"; + + src = fetchFromGitHub { + owner = "rhysd"; + repo = "hgrep"; + rev = "v${version}"; + hash = "sha256-GcV6tZLhAtBE0/husOqZ3Gib9nXXg7kcxrNp9IK0eTo="; + }; + cargoHash = "sha256-NxfWY9OoMNASlWE48njuAdTI11JAV+rzjD0OU2cHLsc="; + + nativeBuildInputs = [ + installShellFiles + ]; + + # Disable bat-printer because I won't use it. + # https://github.com/rhysd/hgrep/blob/v0.3.8/Cargo.toml#L44-L48 + buildNoDefaultFeatures = true; + buildFeatures = [ + "ripgrep" + # "bat-printer" + "syntect-printer" + ]; + + checkFlags = [ + # Disable snapshot tests. + "--skip=tests::arg_matches" + ]; + + postFixup = '' + $out/bin/hgrep --generate-man-page > hgrep.1 + installManPage hgrep.1 + + installShellCompletion --cmd hgrep \ + --bash <($out/bin/hgrep --generate-completion-script bash) \ + --zsh <($out/bin/hgrep --generate-completion-script zsh) \ + --fish <($out/bin/hgrep --generate-completion-script fish) \ + ; + ''; + + meta = { + description = "hgrep is a grep tool with human-friendly search output. This is similar to `-C` option of `grep` command, but its output is enhanced with syntax highlighting focusing on human readable outputs."; + homepage = "https://github.com/rhysd/hgrep"; + changelog = "https://github.com/rhysd/hgrep/raw/v${version}/CHANGELOG.md"; + license = lib.licenses.mit; + mainProgram = "hgrep"; + }; +} diff --git a/pkgs/reparojson/default.nix b/pkgs/reparojson/default.nix new file mode 100644 index 0000000..3402593 --- /dev/null +++ b/pkgs/reparojson/default.nix @@ -0,0 +1,25 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, +}: + +rustPlatform.buildRustPackage rec { + pname = "reparojson"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "nsfisis"; + repo = "reparojson"; + rev = "v${version}"; + hash = "sha256-kex4LNS7yT8BbaNE/uZrGED8Rx2QmPgCgPwBnIO2za8="; + }; + cargoHash = "sha256-nFv22XP5bhS++li21VsB4aMJ3q5veH6zsK9cCNTVz0k="; + + meta = { + description = "A simple command-line tool to repair JSON. It only fixes the syntactic errors and never formats the given input."; + homepage = "https://github.com/nsfisis/reparojson"; + license = lib.licenses.mit; + mainProgram = "reparojson"; + }; +} diff --git a/pkgs/term-banner/default.nix b/pkgs/term-banner/default.nix new file mode 100644 index 0000000..37ab1a5 --- /dev/null +++ b/pkgs/term-banner/default.nix @@ -0,0 +1,25 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: + +buildGoModule rec { + pname = "term-banner"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "nsfisis"; + repo = "term-banner"; + rev = "v${version}"; + hash = "sha256-YCIT+6PdHLrOrPzWpF/U8G8qGcYDXkgVMde/IUWRe84="; + }; + vendorHash = "sha256-i78RKipeirkmteFsYmmmu0gU4cjph01gn/9zl8lcpXM="; + + meta = { + description = "Show a banner in your terminal."; + homepage = "https://github.com/nsfisis/term-banner"; + license = lib.licenses.mit; + mainProgram = "term-banner"; + }; +} diff --git a/pkgs/term-clock/default.nix b/pkgs/term-clock/default.nix new file mode 100644 index 0000000..ce507fe --- /dev/null +++ b/pkgs/term-clock/default.nix @@ -0,0 +1,38 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + installShellFiles, +}: + +buildGoModule rec { + pname = "term-clock"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "nsfisis"; + repo = "term-clock"; + rev = "v${version}"; + hash = "sha256-IB6AFQpbTVfDbEbTnq4sWTxKHAoNQlmw5tvBl13y4yc="; + }; + vendorHash = "sha256-NLxaPtxhb67uhs01DASlAIfCIWV1lnuiu+uFmJcxN0U="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postFixup = '' + installShellCompletion --cmd term-clock \ + --bash <($out/bin/term-clock completion bash) \ + --zsh <($out/bin/term-clock completion zsh) \ + --fish <($out/bin/term-clock completion fish) \ + ; + ''; + + meta = { + description = "A clock on your terminal"; + homepage = "https://github.com/nsfisis/term-clock"; + license = lib.licenses.mit; + mainProgram = "term-clock"; + }; +} |
