about summary refs log tree commit diff
path: root/pkgs/applications/editors/edwood
diff options
context:
space:
mode:
authorIlan Joselevich <personal@ilanjoselevich.com>2023-07-13 01:44:17 +0300
committerckie <git-525ff67@ckie.dev>2023-07-13 04:18:11 +0300
commit277cfaf3287bb541a0b12fd00927ccb4a1fee583 (patch)
tree11991ac5c73ddb2a312faa78c5db41d62fed3291 /pkgs/applications/editors/edwood
parent5a01208e9ee2e467e11cc509873c2a49c315e658 (diff)
edwood: init at 0.3.1
Diffstat (limited to 'pkgs/applications/editors/edwood')
-rw-r--r--pkgs/applications/editors/edwood/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/applications/editors/edwood/default.nix b/pkgs/applications/editors/edwood/default.nix
new file mode 100644
index 0000000000000..8dfa36398bfd3
--- /dev/null
+++ b/pkgs/applications/editors/edwood/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, makeWrapper
+, plan9port
+}:
+
+buildGoModule rec {
+  pname = "edwood";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "rjkroege";
+    repo = "edwood";
+    rev = "v${version}";
+    hash = "sha256-jKDwNq/iMFqVpPq14kZa+T5fES54f4BAujXUwGlbiTE=";
+  };
+
+  vendorHash = "sha256-M7fa46BERNRHbCsAiGqt4GHVVTyrW6iIb6gRc4UuZxA=";
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  ldflags = [
+    "-s"
+    "-w"
+  ];
+
+  postInstall = ''
+    mkdir -p $out/share
+    cp -r build/font $out/share
+
+    wrapProgram $out/bin/edwood \
+      --prefix PATH : ${lib.makeBinPath [ "${plan9port}/plan9" ]} \
+      --set PLAN9 $out/share # envvar is read by edwood to determine the font path prefix
+  '';
+
+  doCheck = false; # Tests has lots of hardcoded mess.
+
+  meta = with lib; {
+    description = "Go version of Plan9 Acme Editor";
+    homepage = "https://github.com/rjkroege/edwood";
+    license = with licenses; [ mit bsd3 ];
+    maintainers = with maintainers; [ kranzes ];
+  };
+}