git.iko.soy/typeable/nixpkgs
on master help sign in
ocaml-astring: init at 0.8.3
commit37a47c1970c94215bbeac2e24d60772e500b00b6 authorsternenseemann <git@lukasepple.de> dateThu 3 Nov 2016, 02:12 (10 years ago) parentc6fcd28
2 files changed+45
pkgs/development/ocaml-modules/astring/default.nix+43 pkgs/top-level/ocaml-packages.nix+2
pkgs/development/ocaml-modules/astring/default.nixnew file+43
@@ -0,0 +1,43 @@
1+{stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, opam}:
2+
3+buildOcaml rec {
4+ version = "0.8.3";
5+ name = "astring";
6+
7+ src = fetchurl {
8+ url = "http://erratique.ch/software/astring/releases/astring-${version}.tbz";
9+ sha256 = "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0";
10+ };
11+
12+ unpackCmd = "tar -xf $curSrc";
13+
14+ buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
15+
16+ buildPhase = ''
17+ ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build
18+ '';
19+
20+ installPhase = ''
21+ opam-installer --script --prefix=$out astring.install | sh
22+ ln -s $out/lib/astring $out/lib/ocaml/${ocaml.version}/site-lib/
23+ '';
24+
25+ meta = {
26+ homepage = http://erratique.ch/software/astring;
27+ description = "Alternative String module for OCaml";
28+ longDescription = ''
29+ Astring exposes an alternative String module for OCaml. This module tries
30+ to balance minimality and expressiveness for basic, index-free, string
31+ processing and provides types and functions for substrings, string sets
32+ and string maps.
33+
34+ Remaining compatible with the OCaml String module is a non-goal.
35+ The String module exposed by Astring has exception safe functions, removes
36+ deprecated and rarely used functions, alters some signatures and names,
37+ adds a few missing functions and fully exploits OCaml's newfound string
38+ immutability.
39+ '';
40+ license = stdenv.lib.licenses.isc;
41+ maintainers = with stdenv.lib.maintainers; [ sternenseemann ];
42+ };
43+}
pkgs/top-level/ocaml-packages.nix+2
@@ -22,6 +22,8 @@ let
2222
2323 asn1-combinators = callPackage ../development/ocaml-modules/asn1-combinators { };
2424
25+ astring = callPackage ../development/ocaml-modules/astring { };
26+
2527 async_extra_p4 = callPackage ../development/ocaml-modules/async_extra { };
2628
2729 async_find = callPackage ../development/ocaml-modules/async_find { };