From e64cd5feecd4f7bbfb895dfafb6496d506334f36 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 28 Apr 2015 00:57:12 +0200 Subject: [PATCH] Adds ocaml-magic-mime This OCaml library contains a database of MIME types that maps filename extensions into MIME types suitable for use in many Internet protocols such as HTTP or e-mail. Homepage: https://github.com/mirage/ocaml-magic-mime --- .../ocaml-modules/magic-mime/default.nix | 24 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/ocaml-modules/magic-mime/default.nix diff --git a/pkgs/development/ocaml-modules/magic-mime/default.nix b/pkgs/development/ocaml-modules/magic-mime/default.nix new file mode 100644 index 000000000000..d77c3f681158 --- /dev/null +++ b/pkgs/development/ocaml-modules/magic-mime/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchzip, ocaml, findlib }: + +let version = "1.0.0"; in + +stdenv.mkDerivation { + name = "ocaml-magic-mime-${version}"; + + src = fetchzip { + url = "https://github.com/mirage/ocaml-magic-mime/archive/v${version}.tar.gz"; + sha256 = "058d83hmxd5mjccxdm3ydchmhk2lca5jdg82jg0klsigmf4ida6v"; + }; + + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + meta = { + homepage = https://github.com/mirage/ocaml-magic-mime; + description = "Convert file extensions to MIME types"; + platforms = ocaml.meta.platforms; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c63e02cef0db..64739664f40f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4163,6 +4163,8 @@ let macaque = callPackage ../development/ocaml-modules/macaque { }; + magic-mime = callPackage ../development/ocaml-modules/magic-mime { }; + magick = callPackage ../development/ocaml-modules/magick { }; menhir = callPackage ../development/ocaml-modules/menhir { };