Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 ocaml, 6 findlib, 7}: 8 9if lib.versionOlder ocaml.version "4.08" then 10 throw "dune 2 is not available for OCaml ${ocaml.version}" 11else 12 13 stdenv.mkDerivation rec { 14 pname = "dune"; 15 version = "2.9.3"; 16 17 src = fetchurl { 18 url = "https://github.com/ocaml/dune/releases/download/${version}/dune-site-${version}.tbz"; 19 sha256 = "sha256:1ml8bxym8sdfz25bx947al7cvsi2zg5lcv7x9w6xb01cmdryqr9y"; 20 }; 21 22 nativeBuildInputs = [ 23 ocaml 24 findlib 25 ]; 26 strictDeps = true; 27 28 buildFlags = [ "release" ]; 29 30 dontAddPrefix = true; 31 dontAddStaticConfigureFlags = true; 32 configurePlatforms = [ ]; 33 34 installFlags = [ 35 "PREFIX=${placeholder "out"}" 36 "LIBDIR=$(OCAMLFIND_DESTDIR)" 37 ]; 38 39 meta = { 40 homepage = "https://dune.build/"; 41 description = "Composable build system"; 42 mainProgram = "dune"; 43 changelog = "https://github.com/ocaml/dune/raw/${version}/CHANGES.md"; 44 maintainers = [ lib.maintainers.vbgl ]; 45 license = lib.licenses.mit; 46 inherit (ocaml.meta) platforms; 47 }; 48 }