diff options
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix b/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix index 70ec7fd34ae1..753f894e0850 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix @@ -1,30 +1,26 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg +{ lib, fetchurl, buildDunePackage +, checkseum, cmdliner +, alcotest, bos, camlzip, mmap, re }: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "decompress is not available for OCaml ${ocaml.version}" -else +buildDunePackage rec { + version = "0.9.0"; + pname = "decompress"; -stdenv.mkDerivation rec { - version = "0.6"; - name = "ocaml${ocaml.version}-decompress-${version}"; - - src = fetchFromGitHub { - owner = "mirage"; - repo = "decompress"; - rev = "v${version}"; - sha256 = "0hfs5zrvimzvjwdg57vrxx9bb7irvlm07dk2yv3s5qhj30zimd08"; + src = fetchurl { + url = "https://github.com/mirage/decompress/releases/download/v${version}/decompress-v${version}.tbz"; + sha256 = "0fryhcvv96vfca51c7kqdn3n3canqsbbvfbi75ya6lca4lmpipbh"; }; - buildInputs = [ ocaml findlib ocamlbuild topkg ]; - - inherit (topkg) buildPhase installPhase; + buildInputs = [ cmdliner ]; + propagatedBuildInputs = [ checkseum ]; + checkInputs = lib.optionals doCheck [ alcotest bos camlzip mmap re ]; + doCheck = true; meta = { description = "Pure OCaml implementation of Zlib"; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (src.meta) homepage; - inherit (ocaml.meta) platforms; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/decompress"; }; } |