about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/magic/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/magic/default.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/magic/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/magic/default.nix b/nixpkgs/pkgs/development/ocaml-modules/magic/default.nix
new file mode 100644
index 000000000000..29ff7e67832c
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/magic/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchFromGitHub, ocaml, findlib, which, file }:
+
+stdenv.mkDerivation rec {
+  pname = "magic";
+  version = "0.7.3";
+
+  src = fetchFromGitHub {
+    owner = "Chris00";
+    repo = "ocaml-magic";
+    rev = "510c473d222a3d3d900b8ae1892d13e0d49d08be"; # no tags in repo
+    sha256 = "0qks3v51xvzxhidai414mbszxhcl8wg8g7zxd04qi260433g77yg";
+  };
+
+  createFindlibDestdir = true;
+
+  nativeBuildInputs = [ which ];
+  buildInputs = [ ocaml findlib ];
+  propagatedBuildInputs = [ file ];
+
+  meta = with lib; {
+    homepage = "https://github.com/Chris00/ocaml-magic";
+    description = "Bindings for libmagic";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}