about summary refs log tree commit diff
path: root/pkgs/tools/misc/rfc
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-10-19 21:42:57 +0300
committerAzat Bahawi <azat@bahawi.net>2022-10-20 17:30:48 +0300
commit661294831548257084f2b09ecfe698dd3b4ec00d (patch)
treecf11885167f53bc461c679b373359fd0bbecc2a6 /pkgs/tools/misc/rfc
parent2df2b52806129828a1dafaa093027f10817e5b3b (diff)
rfc: init at 0.2.6
Diffstat (limited to 'pkgs/tools/misc/rfc')
-rw-r--r--pkgs/tools/misc/rfc/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/tools/misc/rfc/default.nix b/pkgs/tools/misc/rfc/default.nix
new file mode 100644
index 0000000000000..e58c35fef3bdc
--- /dev/null
+++ b/pkgs/tools/misc/rfc/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenvNoCC
+, fetchFromGitHub
+, curl
+, installShellFiles
+, makeWrapper
+}:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "rfc";
+  version = "0.2.6";
+
+  src = fetchFromGitHub {
+    owner = "bfontaine";
+    repo = "rfc";
+    rev = "v${version}";
+    hash = "sha256-dfaeTdJiJuKp8/k6LBP+RC60gTRHfHR5hhLD4ZWJufE=";
+  };
+
+  nativeBuildInputs = [ installShellFiles makeWrapper ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm755 -t $out/bin rfc
+    wrapProgram $out/bin/rfc \
+      --prefix PATH : ${lib.makeBinPath [ curl ]}
+    installManPage man/rfc.1
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A tool to read RFCs from the command line";
+    longDescription = ''
+      rfc is a little tool written in Bash to read RFCs from the command-line.
+      It fetches RFCs and drafts from the Web and caches them locally.
+    '';
+    homepage = "https://github.com/bfontaine/rfc";
+    changelog = "https://github.com/bfontaine/rfc/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ azahi ];
+    platforms = platforms.all;
+  };
+}