3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/ocaml/ocp-indent/default.nix
Silvan Mosberger f5fa5fa4d6 pkgs: refactor needless quoting of homepage meta attribute (#27809)
* pkgs: refactor needless quoting of homepage meta attribute

A lot of packages are needlessly quoting the homepage meta attribute
(about 1400, 22%), this commit refactors all of those instances.

* pkgs: Fixing some links that were wrongfully unquoted in the previous
commit

* Fixed some instances
2017-08-01 22:03:30 +02:00

38 lines
1 KiB
Nix

{ stdenv, fetchzip, ocaml, findlib, ocpBuild, opam, cmdliner }:
let inherit (stdenv.lib) getVersion versionAtLeast; in
assert versionAtLeast (getVersion ocaml) "3.12.1";
assert versionAtLeast (getVersion cmdliner) "1.0.0";
assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta";
stdenv.mkDerivation rec {
name = "ocp-indent-${version}";
version = "1.6.0";
src = fetchzip {
url = "https://github.com/OCamlPro/ocp-indent/archive/${version}.tar.gz";
sha256 = "1h9y597s3ag8w1z32zzv4dfk3ppq557s55bnlfw5a5wqwvia911f";
};
nativeBuildInputs = [ ocpBuild opam ];
buildInputs = [ ocaml findlib cmdliner ];
createFindlibDestdir = true;
preConfigure = "patchShebangs ./install.sh";
postInstall = ''
mv $out/lib/{ocp-indent,ocaml/${getVersion ocaml}/site-lib/}
'';
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 or [];
maintainers = [ maintainers.jirkamarsik ];
};
}