From 070069676ea175ae3171998ef90565d1b459616d Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 18 Sep 2022 00:27:16 +0200 Subject: [PATCH] phetch: init at 1.2.0 --- .../networking/gopher/phetch/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/applications/networking/gopher/phetch/default.nix diff --git a/pkgs/applications/networking/gopher/phetch/default.nix b/pkgs/applications/networking/gopher/phetch/default.nix new file mode 100644 index 00000000000..8cdd3dc0632 --- /dev/null +++ b/pkgs/applications/networking/gopher/phetch/default.nix @@ -0,0 +1,56 @@ +{ lib +, stdenv +, fetchFromGitHub +, installShellFiles +, rustPlatform +, pkg-config +, openssl +, scdoc +, Security +, which +}: + +rustPlatform.buildRustPackage rec { + pname = "phetch"; + version = "1.2.0"; + + outputs = [ "out" "man" ]; + + src = fetchFromGitHub { + owner = "xvxx"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-J+ka7/B37WzVPPE2Krkd/TIiVwuKfI2QYWmT0JHgBGQ="; + }; + + cargoSha256 = "sha256-y3Y5PnZ51Zc3LmVTijUGnb0KaGm28sWOSYxjuM3A1Zk="; + + nativeBuildInputs = [ installShellFiles pkg-config scdoc which ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + + postInstall = '' + make manual + installManPage doc/phetch.1 + ''; + + doCheck = true; + + meta = with lib; { + description = "A quick lil gopher client for your terminal, written in rust"; + longDescription = '' + phetch is a terminal client designed to help you quickly navigate the gophersphere. + - <1MB executable for Linux, Mac, and NetBSD + - Technicolor design (based on GILD) + - No-nonsense keyboard navigation + - Supports Gopher searches, text and menu pages, and downloads + - Save your favorite Gopher sites with bookmarks + - Opt-in history tracking + - Secure Gopher support (TLS) + - Tor support + ''; + changelog = "https://github.com/xvxx/phetch/releases/tag/v${version}"; + homepage = "https://github.com/xvxx/phetch"; + license = licenses.mit; + maintainers = with maintainers; [ felixalbrigtsen ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1c0d8541029..f57e24444fc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22414,6 +22414,10 @@ with pkgs; pe-parse = callPackage ../development/libraries/pe-parse { }; + phetch = callPackage ../applications/networking/gopher/phetch { + inherit (darwin.apple_sdk.frameworks) Security; + }; + inherit (callPackage ../development/libraries/physfs { inherit (darwin.apple_sdk.frameworks) Foundation; })