summary refs log tree commit diff
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2017-03-23 08:58:25 +0100
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-03-30 01:25:13 +0000
commit89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1 (patch)
tree8a240c1d4afb724d2ca8650c69b6eef52694ac27
parent40158137fd427a8d76eb157962e7dea152605ee7 (diff)
downloadnixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.tar
nixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.tar.gz
nixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.tar.bz2
nixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.tar.lz
nixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.tar.xz
nixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.tar.zst
nixpkgs-89e5963f2ca90ebfe66609a0ccb1a5c0ea6643d1.zip
ocamlPackages.higlo: init at 0.6
-rw-r--r--pkgs/development/ocaml-modules/higlo/default.nix29
-rw-r--r--pkgs/development/ocaml-modules/higlo/install.patch14
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
3 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/higlo/default.nix b/pkgs/development/ocaml-modules/higlo/default.nix
new file mode 100644
index 00000000000..1e3a9713406
--- /dev/null
+++ b/pkgs/development/ocaml-modules/higlo/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, xtmpl, ulex }:
+
+stdenv.mkDerivation rec {
+  name = "higlo-${version}";
+  version = "0.6";
+  src = fetchFromGitHub {
+    owner = "zoggy";
+    repo = "higlo";
+    rev = "release-${version}";
+    sha256 = "0m0qyk2ydivai54502s45sdw9w4xr0j3jpwyc4vqk62a7iz9ihxh";
+  };
+
+  buildInputs = [ ocaml findlib ];
+  propagatedBuildInputs = [ xtmpl ulex ];
+
+  createFindlibDestdir = true;
+
+  patches = ./install.patch;
+
+  meta = with stdenv.lib; {
+    description = "OCaml library for syntax highlighting";
+    homepage = "https://zoggy.github.io/higlo/";
+    license = licenses.lgpl3;
+    platforms = ocaml.meta.platforms or [];
+    maintainers = with maintainers; [ regnat ];
+  };
+}
+
+
diff --git a/pkgs/development/ocaml-modules/higlo/install.patch b/pkgs/development/ocaml-modules/higlo/install.patch
new file mode 100644
index 00000000000..bbdaace293b
--- /dev/null
+++ b/pkgs/development/ocaml-modules/higlo/install.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index b8c2e01..fcd07ed 100644
+--- a/Makefile
++++ b/Makefile
+@@ -149,7 +149,8 @@ webdoc:
+ install: install-lib install-bin
+ 
+ install-bin:
+-	$(CP) $(HIGLO) $(HIGLO_BYTE) $(MK_HIGLO) `dirname \`which ocamlfind\``/
++	mkdir -p $(out)/bin
++	$(CP) $(HIGLO) $(HIGLO_BYTE) $(MK_HIGLO) $(out)/bin
+ 
+ install-lib: higlo.cmo higlo.cmx higlo.cmxs $(HIGLO) $(HIGLO_BYTE)
+ 	ocamlfind install higlo META LICENSE \
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 9c105847581..54a8c533879 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -203,6 +203,8 @@ let
 
     herelib = callPackage ../development/ocaml-modules/herelib { };
 
+    higlo = callPackage ../development/ocaml-modules/higlo { };
+
     io-page = callPackage ../development/ocaml-modules/io-page { };
 
     ipaddr_p4 = callPackage ../development/ocaml-modules/ipaddr/2.6.1.nix { };