about summary refs log tree commit diff
path: root/pkgs/by-name/bk
diff options
context:
space:
mode:
authorVuiMuich <vuimuich@quantentunnel.de>2023-11-08 19:21:31 +0100
committerPeter Hoeg <peter@hoeg.com>2023-11-13 13:53:57 +0100
commitaefffb674c88524ce8b5c22bc6d97fa90504b7cc (patch)
tree0726075728312b5c111d4a3ba87969a3b277cad4 /pkgs/by-name/bk
parentafaf6396660d626699c6a505d7939431bec87b0e (diff)
bk: init at 0.6.0
add `mainProgram`

move package to `pkgs/by-name`
Diffstat (limited to 'pkgs/by-name/bk')
-rw-r--r--pkgs/by-name/bk/bk/package.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/by-name/bk/bk/package.nix b/pkgs/by-name/bk/bk/package.nix
new file mode 100644
index 0000000000000..9741278bb1804
--- /dev/null
+++ b/pkgs/by-name/bk/bk/package.nix
@@ -0,0 +1,38 @@
+{ fetchCrate
+, go-md2man
+, installShellFiles
+, lib
+, rustPlatform
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "bk";
+  version = "0.6.0";
+
+  src = fetchCrate {
+    inherit pname version;
+    hash = "sha256-rSMvx/zUZqRRgj48TVVG7RwQT8e70m0kertRJysDY4Y=";
+  };
+
+  cargoHash = "sha256-pE5loMwNMdHL3GODiw3kVVHj374hf3+vIDEYTqvx5WI=";
+
+  nativeBuildInputs = [ go-md2man installShellFiles ];
+
+  postBuild = ''
+    sed -i '$ a # Source and further info' README.md
+    sed -i '$ a https://github.com/aeosynth/bk' README.md
+    go-md2man -in README.md -out bk.1
+  '';
+
+  postInstall = ''
+    installManPage bk.?
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/aeosynth/bk";
+    description = "A terminal epub reader written in rust";
+    license = licenses.mit;
+    maintainers = with maintainers; [ vuimuich ];
+    mainProgram = "bk";
+  };
+}