diff options
author | Jirka Marsik <jiri.marsik89@gmail.com> | 2014-10-28 18:09:42 +0100 |
---|---|---|
committer | Jirka Marsik <jiri.marsik89@gmail.com> | 2014-10-28 18:09:42 +0100 |
commit | 0f1ada577c2b8827b86ee1912cfdf4d2be11b929 (patch) | |
tree | fbd2a757218155770cce9038f80226a842c411dd /pkgs/development/tools/ocaml/ocp-indent | |
parent | 0de41a6871457142e5ac4b06d0c892f65964a869 (diff) | |
download | nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.tar nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.tar.gz nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.tar.bz2 nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.tar.lz nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.tar.xz nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.tar.zst nixlib-0f1ada577c2b8827b86ee1912cfdf4d2be11b929.zip |
Added ocp-indent-1.4.2b
Diffstat (limited to 'pkgs/development/tools/ocaml/ocp-indent')
-rw-r--r-- | pkgs/development/tools/ocaml/ocp-indent/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/ocp-indent/default.nix b/pkgs/development/tools/ocaml/ocp-indent/default.nix new file mode 100644 index 000000000000..d50e003f8474 --- /dev/null +++ b/pkgs/development/tools/ocaml/ocp-indent/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, ocaml, findlib, ocpBuild, opam, cmdliner }: + +let inherit (stdenv.lib) getVersion versionAtLeast; in + +assert versionAtLeast (getVersion ocaml) "3.12.1"; +assert versionAtLeast (getVersion ocpBuild) "1.99.3-beta"; + +stdenv.mkDerivation { + + name = "ocp-indent-1.4.2b"; + + src = fetchurl { + url = "https://github.com/OCamlPro/ocp-indent/archive/1.4.2b.tar.gz"; + sha256 = "1p0n2zcl5kf543x2xlqrz1aa51f0dqal8l392sa41j6wx82j0gpb"; + }; + + buildInputs = [ ocaml findlib ocpBuild opam cmdliner ]; + + createFindlibDestdir = true; + + # The supplied installer uses opam-installer which breaks when run + # normally since it tries to `mkdir $HOME`. However, we can use + # `opam-installer --script` to get the shell script that performs only + # the installation and just run that. Furthermore, we do the same that is + # done by pkgs/development/ocaml-modules/react and rename the paths meant + # for opam-installer so that they are in line with the other OCaml + # libraries in Nixpkgs. + installPhase = '' + opam-installer --script --prefix=$out ocp-indent.install \ + | sed s!lib/ocp-indent!lib/ocaml/${getVersion ocaml}/site-lib/ocp-indent! \ + | sh + ''; + + meta = with stdenv.lib; { + homepage = "http://typerex.ocamlpro.com/ocp-indent.html"; + description = "A customizable tool to indent OCaml code"; + license = licenses.gpl3; + platforms = ocaml.meta.platforms; + maintainers = [ maintainers.jirkamarsik ]; + }; +} |