From 16763ef031f9edc7f9bc5158a8f5e8dc318bce08 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Sat, 5 Jun 2021 19:03:03 -0300 Subject: [PATCH] ocamlPackages.magic-mime: 1.0.0 -> 1.1.3 --- .../ocaml-modules/magic-mime/default.nix | 32 ++++++++----------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/pkgs/development/ocaml-modules/magic-mime/default.nix b/pkgs/development/ocaml-modules/magic-mime/default.nix index 2a5ff08c018..15628bcf26c 100644 --- a/pkgs/development/ocaml-modules/magic-mime/default.nix +++ b/pkgs/development/ocaml-modules/magic-mime/default.nix @@ -1,27 +1,21 @@ -{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }: +{ lib, fetchurl, buildDunePackage }: -let version = "1.0.0"; in +buildDunePackage rec { + pname = "magic-mime"; + version = "1.1.3"; -stdenv.mkDerivation { - pname = "ocaml-magic-mime"; - inherit version; - - src = fetchzip { - url = "https://github.com/mirage/ocaml-magic-mime/archive/v${version}.tar.gz"; - sha256 = "058d83hmxd5mjccxdm3ydchmhk2lca5jdg82jg0klsigmf4ida6v"; + src = fetchurl { + url = "https://github.com/mirage/ocaml-magic-mime/releases/download/v${version}/magic-mime-v${version}.tbz"; + sha256 = "1xqjs8bba567yzrzgnr88j5ck97d36zw68zr9v29liya37k6rcvz"; }; - nativeBuildInputs = [ ocaml findlib ocamlbuild ]; - buildInputs = [ findlib ]; - configurePlatforms = []; + minimalOCamlVersion = "4.03"; + useDune2 = true; - createFindlibDestdir = true; - - meta = { - homepage = "https://github.com/mirage/ocaml-magic-mime"; + meta = with lib; { description = "Convert file extensions to MIME types"; - platforms = ocaml.meta.platforms or []; - license = lib.licenses.isc; - maintainers = with lib.maintainers; [ vbgl ]; + homepage = "https://github.com/mirage/ocaml-magic-mime"; + license = licenses.isc; + maintainers = with maintainers; [ vbgl ]; }; }