about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/kjv
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/kjv')
-rw-r--r--nixpkgs/pkgs/applications/misc/kjv/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/misc/kjv/lukesmithxyz-kjv.nix30
2 files changed, 71 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/kjv/default.nix b/nixpkgs/pkgs/applications/misc/kjv/default.nix
new file mode 100644
index 000000000000..dca694bf2979
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/kjv/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, readline }:
+
+let
+  patchPrefix = "https://web.archive.org/web/20220422205751/https://github.com/samuelgrf/kjv/commit/";
+
+  add-apocrypha = fetchpatch {
+    url = patchPrefix + "0856fa0d37b45de0d6b47d163b5ea9a0b7f2c061.patch";
+    sha256 = "1jkajdg4wvpbbwc5mn37i4c8nfis4z0pv5rl7gqs0laj0gpj7jn8";
+  };
+
+  add-install-target = fetchpatch {
+    url = patchPrefix + "50a83256ee45430fb06b7aea1945dd91c6813bc3.patch";
+    sha256 = "0bv9yma67jdj496a6vn6y007c9gwjpg3rzld1i9m9y9xmlzq4yzv";
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "kjv";
+  version = "unstable-2021-03-11";
+
+  src = fetchFromGitHub {
+    owner = "bontibon";
+    repo = "kjv";
+    rev = "108595dcbb9bb12d40e0309f029b6fb3ccd81309";
+    hash = "sha256-Z6myd9Xn23pYizG+IZVDrP988pYU06QIcpqXtWTcPiw=";
+  };
+
+  patches = [ add-apocrypha add-install-target ];
+
+  buildInputs = [ readline ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    description = "The Bible, King James Version";
+    homepage = "https://github.com/bontibon/kjv";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ jtobin cafkafk ];
+    mainProgram = "kjv";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/misc/kjv/lukesmithxyz-kjv.nix b/nixpkgs/pkgs/applications/misc/kjv/lukesmithxyz-kjv.nix
new file mode 100644
index 000000000000..27a1a9050284
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/kjv/lukesmithxyz-kjv.nix
@@ -0,0 +1,30 @@
+{ lib
+, gawk
+, stdenv
+, fetchFromGitHub
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lukesmithxyz-bible-kjv";
+  version = "unstable-2022-06-01";
+
+  src = fetchFromGitHub {
+    owner = "lukesmithxyz";
+    repo = "kjv";
+    rev = "1b675c0396806a2a3d134c51fd11d9fed8ea3dc5";
+    hash = "sha256-ii5SGZmO99VYbKdebfEbN3rL7LLSSQ0jm5mGqX2G3o0=";
+  };
+
+  buildInputs = [ gawk ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "Read the Word of God from your terminal + Apocrypha";
+    mainProgram = "kjv";
+    homepage = "https://lukesmith.xyz/articles/command-line-bibles";
+    license = licenses.unlicense;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.wesleyjrz ];
+  };
+}