nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 21.11 47 lines 1.6 kB view raw
1{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }: 2 3let 4 # Use astring 0.8.3 for OCaml < 4.05 5 param = 6 if lib.versionAtLeast ocaml.version "4.05" 7 then { 8 version = "0.8.5"; 9 sha256 = "1ykhg9gd3iy7zsgyiy2p9b1wkpqg9irw5pvcqs3sphq71iir4ml6"; 10 } else { 11 version = "0.8.3"; 12 sha256 = "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"; 13 }; 14in 15 16stdenv.mkDerivation { 17 name = "ocaml${ocaml.version}-astring-${param.version}"; 18 inherit (param) version; 19 20 src = fetchurl { 21 url = "https://erratique.ch/software/astring/releases/astring-${param.version}.tbz"; 22 inherit (param) sha256; 23 }; 24 25 buildInputs = [ ocaml findlib ocamlbuild topkg ]; 26 27 inherit (topkg) buildPhase installPhase; 28 29 meta = { 30 homepage = "https://erratique.ch/software/astring"; 31 description = "Alternative String module for OCaml"; 32 longDescription = '' 33 Astring exposes an alternative String module for OCaml. This module tries 34 to balance minimality and expressiveness for basic, index-free, string 35 processing and provides types and functions for substrings, string sets 36 and string maps. 37 38 Remaining compatible with the OCaml String module is a non-goal. 39 The String module exposed by Astring has exception safe functions, removes 40 deprecated and rarely used functions, alters some signatures and names, 41 adds a few missing functions and fully exploits OCaml's newfound string 42 immutability. 43 ''; 44 license = lib.licenses.isc; 45 maintainers = with lib.maintainers; [ sternenseemann ]; 46 }; 47}