Commit 5c8db99f authored by Emery Hemingway's avatar Emery Hemingway Committed by Emery Hemingway
Browse files
parent 7f100c8e
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  tclPackages,
  fetchurl,
}:

stdenv.mkDerivation {
  pname = "ma";
  version = "11";

  src = fetchurl {
    url = "http://call-with-current-continuation.org/ma/ma.tar.gz";
    hash = "sha256-1UVxXbN2jSNm13BjyoN3jbKtkO3DUEEHaDOC2Ibbxf4=";
  };

  buildInputs = [
    tclPackages.tk
  ];

  buildPhase = ''
    runHook preBuild
    ./build
    for f in B ma ma-eval; do
      substituteInPlace $f --replace-fail \
        'set exec_prefix ""' "set exec_prefix \"$out/bin/\""
    done
    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall
    install -Dt $out/bin \
      B awd ma ma-eval plumb pty win
    runHook postInstall
  '';

  meta = {
    description = "minimalistic variant of the Acme editor";
    homepage = "http://call-with-current-continuation.org/ma/ma.html";
    mainProgram = "ma";
    maintainers = with lib.maintainers; [ ehmry ];
    license = lib.licenses.free;
    inherit (tclPackages.tk.meta) platforms;
  };
}