From 569ef7d3f036bf67fbf9719bb9810da46c1c42a9 Mon Sep 17 00:00:00 2001 From: Jiri Marsik Date: Tue, 28 Oct 2014 14:00:28 +0100 Subject: [PATCH 1/5] Add jirkamarsik to maintainers --- lib/maintainers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index effcfb36e9d..2ce5117b5f2 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -73,6 +73,7 @@ jagajaga = "Arseniy Seroka "; jcumming = "Jack Cummings "; jgeerds = "Jascha Geerds "; + jirkamarsik = "Jirka Marsik "; joamaki = "Jussi Maki "; joelteon = "Joel Taylor "; jwiegley = "John Wiegley "; From c6fa8d0fd3f6a01d8eb9eec347f000e8dcff30c2 Mon Sep 17 00:00:00 2001 From: Jiri Marsik Date: Tue, 28 Oct 2014 14:00:48 +0100 Subject: [PATCH 2/5] Added ansiterminal-0.6.5 --- .../ocaml-modules/ansiterminal/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ansiterminal/default.nix diff --git a/pkgs/development/ocaml-modules/ansiterminal/default.nix b/pkgs/development/ocaml-modules/ansiterminal/default.nix new file mode 100644 index 00000000000..64b4f8263ff --- /dev/null +++ b/pkgs/development/ocaml-modules/ansiterminal/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchurl, ocaml, findlib }: + +stdenv.mkDerivation { + + name = "ansiterminal-0.6.5"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1206/ANSITerminal-0.6.5.tar.gz"; + sha256 = "1j9kflv2i16vf9hy031cl6z8hv6791mjbhnd9bw07y1pswdlx1r6"; + }; + + buildInputs = [ ocaml findlib ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + + buildPhase = "ocaml setup.ml -build"; + + installPhase = "ocaml setup.ml -install"; + + createFindlibDestdir = true; + + meta = with stdenv.lib; { + homepage = "https://forge.ocamlcore.org/projects/ansiterminal"; + description = "A module allowing to use the colors and cursor movements on ANSI terminals"; + longDescription = '' + ANSITerminal is a module allowing to use the colors and cursor + movements on ANSI terminals. It also works on the windows shell (but + this part is currently work in progress). + ''; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fc5ef6913a3..952fd320f0e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3444,6 +3444,8 @@ let in rec { inherit ocaml; + ansiterminal = callPackage ../development/ocaml-modules/ansiterminal { }; + camlidl = callPackage ../development/tools/ocaml/camlidl { }; camlp4 = From 50fccd034731373ac2e5c01f2f1dde030fd70a7f Mon Sep 17 00:00:00 2001 From: Jiri Marsik Date: Tue, 28 Oct 2014 14:03:14 +0100 Subject: [PATCH 3/5] Added bolt-1.4 --- .../ocaml-modules/bolt/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/ocaml-modules/bolt/default.nix diff --git a/pkgs/development/ocaml-modules/bolt/default.nix b/pkgs/development/ocaml-modules/bolt/default.nix new file mode 100644 index 00000000000..9b0efd816bd --- /dev/null +++ b/pkgs/development/ocaml-modules/bolt/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, ocaml, findlib, which }: + +let inherit (stdenv.lib) getVersion versionAtLeast; in + +assert versionAtLeast (getVersion ocaml) "4.00.0"; +assert versionAtLeast (getVersion findlib) "1.3.3"; + +stdenv.mkDerivation rec { + + name = "bolt-1.4"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1043/${name}.tar.gz"; + sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy"; + }; + + buildInputs = [ ocaml findlib which ]; + + # The custom `configure` script does not expect the --prefix + # option. Installation is handled by ocamlfind. + dontAddPrefix = true; + + createFindlibDestdir = true; + + buildFlags = "all"; + + doCheck = true; + checkTarget = "tests"; + + meta = with stdenv.lib; { + homepage = "http://bolt.x9c.fr"; + description = "A logging tool for the OCaml language"; + longDescription = '' + Bolt is a logging tool for the OCaml language. It is inspired by and + modeled after the famous log4j logging framework for Java. + ''; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 952fd320f0e..09ac8e44af1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3446,6 +3446,8 @@ let ansiterminal = callPackage ../development/ocaml-modules/ansiterminal { }; + bolt = callPackage ../development/ocaml-modules/bolt { }; + camlidl = callPackage ../development/tools/ocaml/camlidl { }; camlp4 = From b4b3368c8ddd513255ffe7c48e52750e0189d7cb Mon Sep 17 00:00:00 2001 From: Jiri Marsik Date: Tue, 28 Oct 2014 14:06:04 +0100 Subject: [PATCH 4/5] Added the CECILL 2.0 license --- lib/licenses.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/licenses.nix b/lib/licenses.nix index fd9b4eaeb31..da5cc3a927d 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -87,6 +87,11 @@ rec { fullName = "Common Development and Distribution License 1.0"; }; + cecill20 = spdx { + shortName = "CECILL-2.0"; + fullName = "CeCILL Free Software License Agreement v2.0"; + }; + cecill-b = spdx { shortName = "CECILL-B"; fullName = "CeCILL-B Free Software License Agreement"; From ceba23605c35de2a1eb41ac1a951036389f3238a Mon Sep 17 00:00:00 2001 From: Jiri Marsik Date: Tue, 28 Oct 2014 14:06:21 +0100 Subject: [PATCH 5/5] Added acgtk-1.1 --- .../science/logic/acgtk/default.nix | 51 +++++++++++++++++++ .../acgtk/install-emacs-to-site-lisp.patch | 23 +++++++++ .../logic/acgtk/use-nix-ocaml-byteflags.patch | 11 ++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 87 insertions(+) create mode 100644 pkgs/applications/science/logic/acgtk/default.nix create mode 100644 pkgs/applications/science/logic/acgtk/install-emacs-to-site-lisp.patch create mode 100644 pkgs/applications/science/logic/acgtk/use-nix-ocaml-byteflags.patch diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix new file mode 100644 index 00000000000..41c6cf75f32 --- /dev/null +++ b/pkgs/applications/science/logic/acgtk/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal, + buildBytecode ? true, + buildNative ? true, + installExamples ? true, + installEmacsMode ? true }: + +let inherit (stdenv.lib) getVersion versionAtLeast + optionals optionalString; in + +assert versionAtLeast (getVersion ocaml) "3.07"; +assert versionAtLeast (getVersion dypgen) "20080925"; +assert versionAtLeast (getVersion bolt) "1.4"; + +assert buildBytecode || buildNative; + +stdenv.mkDerivation { + + name = "acgtk-1.1"; + + src = fetchurl { + url = "http://www.loria.fr/equipes/calligramme/acg/software/acg-1.1-20140905.tar.gz"; + sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6"; + }; + + buildInputs = [ ocaml findlib dypgen bolt ansiterminal ]; + + patches = [ ./install-emacs-to-site-lisp.patch + ./use-nix-ocaml-byteflags.patch ]; + + # The bytecode executable is dependent on the dynamic library provided by + # ANSITerminal. We can use the -dllpath flag of ocamlc (analogous to + # -rpath) to make sure that ocamlrun is able to link the library at + # runtime and that Nix detects a runtime dependency. + NIX_OCAML_BYTEFLAGS = "-dllpath ${ansiterminal}/lib/ocaml/${getVersion ocaml}/site-lib/ANSITerminal"; + + buildFlags = optionalString buildBytecode "byte" + + " " + + optionalString buildNative "opt"; + + installTargets = "install" + + " " + optionalString installExamples "install-examples" + + " " + optionalString installEmacsMode "install-emacs"; + + meta = with stdenv.lib; { + homepage = "http://www.loria.fr/equipes/calligramme/acg"; + description = "A toolkit for developing ACG signatures and lexicon"; + license = licenses.cecill20; + platforms = ocaml.meta.platforms; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/pkgs/applications/science/logic/acgtk/install-emacs-to-site-lisp.patch b/pkgs/applications/science/logic/acgtk/install-emacs-to-site-lisp.patch new file mode 100644 index 00000000000..43ddd20b4a3 --- /dev/null +++ b/pkgs/applications/science/logic/acgtk/install-emacs-to-site-lisp.patch @@ -0,0 +1,23 @@ +--- acg-1.1-20140905/Makefile.in 2014-10-24 15:21:39.442287208 +0200 ++++ acg-1.1-20140905/Makefile.in.new 2014-10-24 15:24:58.557117228 +0200 +@@ -35,6 +35,7 @@ + ACGC_DIR=src/acg-data + + DATA_DIR=@datarootdir@/acgtk ++EMACS_DIR=@prefix@/share/emacs/site-lisp + + + +@@ -82,10 +83,10 @@ + rm -r $(DATA_DIR) + + install-emacs: +- mkdir -p $(DATA_DIR) && cp -r emacs $(DATA_DIR)/. ++ mkdir -p $(EMACS_DIR) && cp emacs/acg.el $(EMACS_DIR) + + uninstall-emacs: +- rm -rf $(DATA_DIR)/emacs ++ rm -rf $(EMACS_DIR)/emacs + + install-examples: + mkdir -p $(DATA_DIR) && cp -r examples $(DATA_DIR)/. diff --git a/pkgs/applications/science/logic/acgtk/use-nix-ocaml-byteflags.patch b/pkgs/applications/science/logic/acgtk/use-nix-ocaml-byteflags.patch new file mode 100644 index 00000000000..26ade37e452 --- /dev/null +++ b/pkgs/applications/science/logic/acgtk/use-nix-ocaml-byteflags.patch @@ -0,0 +1,11 @@ +--- acg-1.1-20140905/src/Makefile.master.in 2014-10-27 10:59:42.263382081 +0100 ++++ acg-1.1-20140905/src/Makefile.master.in.new 2014-10-27 10:59:59.683597972 +0100 +@@ -23,7 +23,7 @@ + # All warnings are treated as errors + WARNINGS = @OCAML09WARNINGS@ -warn-error A + COMMONFLAGS= $(WARNINGS) @TYPES@ +-BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG) ++BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG) $(NIX_OCAML_BYTEFLAGS) + OPTFLAGS = $(COMMONFLAGS) + LFLAGS= -a + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09ac8e44af1..6dfdec050ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3444,6 +3444,8 @@ let in rec { inherit ocaml; + acgtk = callPackage ../applications/science/logic/acgtk { }; + ansiterminal = callPackage ../development/ocaml-modules/ansiterminal { }; bolt = callPackage ../development/ocaml-modules/bolt { };