depot/third_party/nixpkgs/pkgs/development/ocaml-modules/twt/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

40 lines
918 B
Nix

{ lib, stdenv, fetchFromGitHub, ocaml, findlib }:
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
"twt is not available for OCaml ${ocaml.version}"
stdenv.mkDerivation rec {
pname = "ocaml${ocaml.version}-twt";
version = "0.94.0";
src = fetchFromGitHub {
owner = "mlin";
repo = "twt";
rev = "v${version}";
sha256 = "sha256-xbjLPd7P1KyuC3i6WHLBcdLwd14atcBsd5ER+l97KAk=";
};
nativeBuildInputs = [ ocaml findlib ];
strictDeps = true;
preInstall = ''
mkdir -p $out/bin
mkdir -p $OCAMLFIND_DESTDIR
'';
dontBuild = true;
installFlags = [ "PREFIX=$(out)" ];
dontStrip = true;
meta = with lib; {
description = "The Whitespace Thing for OCaml";
homepage = "http://people.csail.mit.edu/mikelin/ocaml+twt/";
license = licenses.mit;
maintainers = [ maintainers.vbgl ];
mainProgram = "ocaml+twt";
inherit (ocaml.meta) platforms;
};
}