diff --git a/pkgs/by-name/ma/ma/package.nix b/pkgs/by-name/ma/ma/package.nix new file mode 100644 index 000000000000..50063cca5c35 --- /dev/null +++ b/pkgs/by-name/ma/ma/package.nix @@ -0,0 +1,46 @@ +{ + 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; + }; +}