nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, ocaml, findlib }:
2
3stdenv.mkDerivation rec {
4 pname = "ocaml${ocaml.version}-twt";
5 version = "0.94.0";
6
7 src = fetchFromGitHub {
8 owner = "mlin";
9 repo = "twt";
10 rev = "v${version}";
11 sha256 = "sha256-xbjLPd7P1KyuC3i6WHLBcdLwd14atcBsd5ER+l97KAk=";
12 };
13
14 nativeBuildInputs = [ ocaml findlib ];
15
16 strictDeps = true;
17
18 preInstall = ''
19 mkdir -p $out/bin
20 mkdir -p $OCAMLFIND_DESTDIR
21 '';
22
23 dontBuild = true;
24
25 installFlags = [ "PREFIX=$(out)" ];
26
27 dontStrip = true;
28
29 meta = with lib; {
30 description = "“The Whitespace Thing” for OCaml";
31 homepage = "http://people.csail.mit.edu/mikelin/ocaml+twt/";
32 license = licenses.mit;
33 maintainers = [ maintainers.vbgl ];
34 mainProgram = "ocaml+twt";
35 inherit (ocaml.meta) platforms;
36 };
37}