diff options
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/semver/default.nix | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/pkgs/development/ocaml-modules/semver/default.nix b/pkgs/development/ocaml-modules/semver/default.nix index 15bd02f18687..5f4880c0cf2e 100644 --- a/pkgs/development/ocaml-modules/semver/default.nix +++ b/pkgs/development/ocaml-modules/semver/default.nix @@ -1,29 +1,19 @@ -{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }: +{ lib, fetchurl, buildDunePackage, ocaml, alcotest }: -lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") - "semver is not available on OCaml older than 4.02" - -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-semver"; - version = "0.1.0"; - src = fetchzip { - url = "https://github.com/rgrinberg/ocaml-semver/archive/v${version}.tar.gz"; - sha256 = "sha256-0BzeuVTpuRIQjadGg08hTvMzZtKCl2utW2YK269oETk="; +buildDunePackage rec { + pname = "semver"; + version = "0.2.1"; + src = fetchurl { + url = "https://github.com/rgrinberg/ocaml-semver/releases/download/${version}/semver-${version}.tbz"; + hash = "sha256-CjzDUtoe5Hvt6zImb+EqVIulRUUUQd9MmuJ4BH/2mLg="; }; - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - ]; - - strictDeps = true; - createFindlibDestdir = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; + checkInputs = [ alcotest ]; meta = { homepage = "https://github.com/rgrinberg/ocaml-semver"; description = "Semantic versioning module"; - platforms = ocaml.meta.platforms; license = lib.licenses.bsd3; maintainers = [ lib.maintainers.ulrikstrid ]; }; |