about summary refs log tree commit diff
path: root/pkgs/applications/editors/openvi/default.nix
diff options
context:
space:
mode:
authoraleksana <me@aleksana.moe>2023-05-05 06:47:06 +0800
committeraleksana <me@aleksana.moe>2023-05-05 18:49:13 +0800
commit64ec522697d4c5050b97e47fd96467b400f668d7 (patch)
tree788c6802ba19893bac893ec0c1cf4f99c7ebfac1 /pkgs/applications/editors/openvi/default.nix
parent2909d9b11778ee01908656f63398aa5b9831bc27 (diff)
openvi: init at 7.3.22
Diffstat (limited to 'pkgs/applications/editors/openvi/default.nix')
-rw-r--r--pkgs/applications/editors/openvi/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/applications/editors/openvi/default.nix b/pkgs/applications/editors/openvi/default.nix
new file mode 100644
index 0000000000000..43c4d89272687
--- /dev/null
+++ b/pkgs/applications/editors/openvi/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchpatch
+, ncurses
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openvi";
+  version = "7.3.22";
+
+  src = fetchFromGitHub {
+    owner = "johnsonjh";
+    repo = "OpenVi";
+    rev = version;
+    hash = "sha256-yXYiH2FCT7ffRPmb28V54+KO1RLs8L9KHk3remkMWmA=";
+  };
+
+  patches = [
+    # do not attempt to install to /var/tmp/vi.recover
+    (fetchpatch {
+      url = "https://github.com/johnsonjh/OpenVi/commit/5205f0234369963c443e83ca5028ca63feaaac91.patch";
+      hash = "sha256-hoKzQLnpdRbc48wffWbzFtivr20VqEPs4WRPXuDa/88=";
+    })
+  ];
+
+  buildInputs = [ ncurses ];
+
+  makeFlags = [
+    "PREFIX=$(out)"
+    # command -p will yield command not found erorr
+    "PAWK=awk"
+    # silently fail the chown command
+    "IUSGR=$(USER)"
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/johnsonjh/OpenVi";
+    description = "Portable OpenBSD vi for UNIX systems";
+    license = licenses.bsd3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ aleksana ];
+  };
+}