1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/default.nix

39 lines
1.6 KiB
Nix
Raw Normal View History

2017-02-04 15:07:45 +00:00
{ stdenv, fetchurl, ocaml, findlib, camlp4, ounit, gettext, fileutils, camomile }:
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-gettext-${version}";
version = "0.3.8";
2017-02-04 15:07:45 +00:00
src = fetchurl {
url = "https://forge.ocamlcore.org/frs/download.php/1731/ocaml-gettext-${version}.tar.gz";
sha256 = "05wnpxwzzpn2qinah2wb5wzfh5iz8gyf8jyihdbjxc8mk4hf70qv";
2017-02-04 15:07:45 +00:00
};
propagatedBuildInputs = [ gettext fileutils camomile ];
buildInputs = [ ocaml findlib camlp4 ounit ];
postPatch = stdenv.lib.optionalString (camlp4 != null) ''
substituteInPlace test/test.ml --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
substituteInPlace ocaml-gettext/OCamlGettext.ml --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
substituteInPlace ocaml-gettext/Makefile --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
substituteInPlace ocaml-gettext/Makefile --replace "unix.cma" ""
substituteInPlace libgettext-ocaml/Makefile --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4"
substituteInPlace libgettext-ocaml/Makefile --replace "\$(shell ocamlc -where)" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib"
'';
configureFlags = [ "--disable-doc" ];
createFindlibDestdir = true;
2017-10-12 06:35:26 +01:00
dontStrip = true;
2017-02-04 15:07:45 +00:00
meta = with stdenv.lib; {
description = "OCaml Bindings to gettext";
homepage = https://forge.ocamlcore.org/projects/ocaml-gettext;
license = licenses.gpl2;
maintainers = [ maintainers.volth ];
platforms = ocaml.meta.platforms or [];
};
}