diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2020-04-14 07:38:11 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2020-04-21 08:47:40 +0200 |
commit | 974920ccd47fc4c1cc4a702b2d36f61d9392d53b (patch) | |
tree | 88f902c47bf8fee3a8163a71bb2a9c17e8f5fcdc /pkgs | |
parent | fc317e100af833c7f2411be39ababeb8c3565a91 (diff) |
ocamlPackages.alcotest: 0.8.5 → 1.0.1
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/ocaml-modules/alcotest/default.nix | 45 |
1 files changed, 11 insertions, 34 deletions
diff --git a/pkgs/development/ocaml-modules/alcotest/default.nix b/pkgs/development/ocaml-modules/alcotest/default.nix index d485b997c28d4..3ebf0f3ed6bd3 100644 --- a/pkgs/development/ocaml-modules/alcotest/default.nix +++ b/pkgs/development/ocaml-modules/alcotest/default.nix @@ -1,45 +1,22 @@ -{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, dune -, cmdliner, astring, fmt, result, uuidm +{ lib, buildDunePackage, fetchurl +, astring, cmdliner, fmt, uuidm, re, stdlib-shims }: -let param = - if stdenv.lib.versionAtLeast ocaml.version "4.02" then { - version = "0.8.5"; - sha256 = "1mhckvdcxkikbzgvy24kjz4265l15b86a6swz7m3ynbgvqdcfzqn"; - nativeBuildInputs = [ dune ]; - propagatedBuildInputs = [ uuidm ]; - buildPhase = "dune build -p alcotest"; - inherit (dune) installPhase; - } else { - version = "0.7.2"; - sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md"; - buildInputs = [ topkg ]; - nativeBuildInputs = [ ocamlbuild ]; - inherit (topkg) buildPhase installPhase; - }; -in - -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-alcotest-${version}"; - inherit (param) version buildPhase installPhase; +buildDunePackage rec { + pname = "alcotest"; + version = "1.0.1"; - src = fetchzip { - url = "https://github.com/mirage/alcotest/archive/${version}.tar.gz"; - inherit (param) sha256; + src = fetchurl { + url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-${version}.tbz"; + sha256 = "1xlklxb83gamqbg8j5dzm5jk4mvcwkspxajh93p6vpw9ia1li1qc"; }; - nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []); - buildInputs = [ findlib ] ++ (param.buildInputs or []); - - propagatedBuildInputs = [ cmdliner astring fmt result ] - ++ (param.propagatedBuildInputs or []); - - createFindlibDestdir = true; + propagatedBuildInputs = [ astring cmdliner fmt uuidm re stdlib-shims ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/mirage/alcotest"; description = "A lightweight and colourful test framework"; - license = stdenv.lib.licenses.isc; + license = licenses.isc; maintainers = [ maintainers.ericbmerritt ]; }; } |