1{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, file }:
2
3stdenv.mkDerivation rec {
4 pname = "magic";
5 version = "0.7.3";
6
7 src = fetchFromGitHub {
8 owner = "Chris00";
9 repo = "ocaml-magic";
10 rev = "510c473d222a3d3d900b8ae1892d13e0d49d08be"; # no tags in repo
11 sha256 = "0qks3v51xvzxhidai414mbszxhcl8wg8g7zxd04qi260433g77yg";
12 };
13
14 createFindlibDestdir = true;
15
16 nativeBuildInputs = [ which ];
17 buildInputs = [ ocaml findlib ];
18 propagatedBuildInputs = [ file ];
19
20 meta = with lib; {
21 homepage = "https://github.com/Chris00/ocaml-magic";
22 description = "Bindings for libmagic";
23 license = licenses.lgpl21Plus;
24 maintainers = with maintainers; [ dandellion ];
25 };
26}