ocamlPackages.semver: 0.1.0 → 0.2.1

authored by Vincent Laporte and committed by Vincent Laporte 07055fb3 c52cf532

+9 -19
+9 -19
pkgs/development/ocaml-modules/semver/default.nix
··· 1 - { stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }: 1 + { lib, fetchurl, buildDunePackage, ocaml, alcotest }: 2 2 3 - lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") 4 - "semver is not available on OCaml older than 4.02" 5 - 6 - stdenv.mkDerivation rec { 7 - pname = "ocaml${ocaml.version}-semver"; 8 - version = "0.1.0"; 9 - src = fetchzip { 10 - url = "https://github.com/rgrinberg/ocaml-semver/archive/v${version}.tar.gz"; 11 - sha256 = "sha256-0BzeuVTpuRIQjadGg08hTvMzZtKCl2utW2YK269oETk="; 3 + buildDunePackage rec { 4 + pname = "semver"; 5 + version = "0.2.1"; 6 + src = fetchurl { 7 + url = "https://github.com/rgrinberg/ocaml-semver/releases/download/${version}/semver-${version}.tbz"; 8 + hash = "sha256-CjzDUtoe5Hvt6zImb+EqVIulRUUUQd9MmuJ4BH/2mLg="; 12 9 }; 13 10 14 - nativeBuildInputs = [ 15 - ocaml 16 - findlib 17 - ocamlbuild 18 - ]; 19 - 20 - strictDeps = true; 21 - createFindlibDestdir = true; 11 + doCheck = lib.versionAtLeast ocaml.version "4.08"; 12 + checkInputs = [ alcotest ]; 22 13 23 14 meta = { 24 15 homepage = "https://github.com/rgrinberg/ocaml-semver"; 25 16 description = "Semantic versioning module"; 26 - platforms = ocaml.meta.platforms; 27 17 license = lib.licenses.bsd3; 28 18 maintainers = [ lib.maintainers.ulrikstrid ]; 29 19 };