Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchzip, 4 buildDunePackage, 5 ocaml, 6}: 7 8lib.throwIf (lib.versionAtLeast ocaml.version "5.0") "nonstd is not available for OCaml 5.0" 9 10 buildDunePackage 11 rec { 12 pname = "nonstd"; 13 version = "0.0.3"; 14 15 minimalOCamlVersion = "4.02"; 16 17 src = fetchzip { 18 url = "https://bitbucket.org/smondet/${pname}/get/${pname}.${version}.tar.gz"; 19 sha256 = "0ccjwcriwm8fv29ij1cnbc9win054kb6pfga3ygzdbjpjb778j46"; 20 }; 21 22 duneVersion = if lib.versionAtLeast ocaml.version "4.12" then "2" else "1"; 23 postPatch = lib.optionalString (duneVersion != "1") "dune upgrade"; 24 doCheck = true; 25 26 meta = with lib; { 27 homepage = "https://bitbucket.org/smondet/nonstd"; 28 description = "Non-standard mini-library"; 29 license = licenses.isc; 30 maintainers = [ maintainers.alexfmpe ]; 31 }; 32 }