From 499149ef950c54c669e4a1d6cdf6f4cc121f543e Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 4 Jul 2023 15:01:03 +0200 Subject: [PATCH] ocamlPackages.b0: Init at 0.0.5 The recent package is a dependency for odig. --- pkgs/development/ocaml-modules/b0/default.nix | 46 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/ocaml-modules/b0/default.nix diff --git a/pkgs/development/ocaml-modules/b0/default.nix b/pkgs/development/ocaml-modules/b0/default.nix new file mode 100644 index 000000000000..e3c21c31e689 --- /dev/null +++ b/pkgs/development/ocaml-modules/b0/default.nix @@ -0,0 +1,46 @@ +{ lib, stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild, cmdliner }: + +let + +in lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") +"b0 is not available for OCaml ${ocaml.version}" + +stdenv.mkDerivation rec { + + pname = "ocaml${ocaml.version}-b0"; + version = "0.0.5"; + + src = fetchurl { + url = "${meta.homepage}/releases/b0-${version}.tbz"; + sha256 = "sha256-ty04JQcP4RCme/VQw0ko2IBebWWX5cBU6nRTTeV1I/I="; + }; + + strictDeps = true; + + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg cmdliner ]; + + inherit (topkg) buildPhase installPhase; + + meta = with lib; { + description = "Software construction and deployment kit"; + longDescription = '' + WARNING this package is unstable and work in progress, do not depend on + it. + B0 describes software construction and deployments using modular and + customizable definitions written in OCaml. B0 describes: + * Build environments. + * Software configuration, build and testing. + * Source and binary deployments. + * Software life-cycle procedures. + B0 also provides the B00 build library which provides abitrary build + abstraction with reliable and efficient incremental rebuilds. The B00 + library can be – and has been – used on its own to devise domain specific + build systems. + ''; + homepage = "https://erratique.ch/software/b0"; + inherit (ocaml.meta) platforms; + license = licenses.isc; + maintainers = [ maintainers.Julow ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e6cbbec2da74..0767b58a43af 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -60,6 +60,8 @@ let ### B ### + b0 = callPackage ../development/ocaml-modules/b0 { }; + bap = janeStreet_0_15.bap; base64 = callPackage ../development/ocaml-modules/base64 { };