about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2014-10-31 11:14:24 +0100
committerPeter Simons <simons@cryp.to>2014-10-31 11:14:24 +0100
commitb11060d8db2f856f3feaaa9d84df36606504d071 (patch)
tree74d8e01a5d7eb246dd25819a1b7f926082700732 /pkgs/applications/science
parentc04e49289871232ff3c2fd1239b64c2513f18fd1 (diff)
parente18e77fbcdebc5bf1768157747b7e6d1ae7d9379 (diff)
downloadnixlib-b11060d8db2f856f3feaaa9d84df36606504d071.tar
nixlib-b11060d8db2f856f3feaaa9d84df36606504d071.tar.gz
nixlib-b11060d8db2f856f3feaaa9d84df36606504d071.tar.bz2
nixlib-b11060d8db2f856f3feaaa9d84df36606504d071.tar.lz
nixlib-b11060d8db2f856f3feaaa9d84df36606504d071.tar.xz
nixlib-b11060d8db2f856f3feaaa9d84df36606504d071.tar.zst
nixlib-b11060d8db2f856f3feaaa9d84df36606504d071.zip
Merge remote-tracking branch 'origin/master' into staging.
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/electronics/qucs/default.nix11
-rw-r--r--pkgs/applications/science/logic/acgtk/default.nix51
-rw-r--r--pkgs/applications/science/logic/acgtk/install-emacs-to-site-lisp.patch23
-rw-r--r--pkgs/applications/science/logic/acgtk/use-nix-ocaml-byteflags.patch11
4 files changed, 90 insertions, 6 deletions
diff --git a/pkgs/applications/science/electronics/qucs/default.nix b/pkgs/applications/science/electronics/qucs/default.nix
index dd3eaecc7441..6d89d9e52715 100644
--- a/pkgs/applications/science/electronics/qucs/default.nix
+++ b/pkgs/applications/science/electronics/qucs/default.nix
@@ -1,17 +1,16 @@
-{stdenv, fetchurl, qt3, libX11}:
+{stdenv, fetchurl, flex, bison, qt4, libX11 }:
 
 stdenv.mkDerivation rec {
-  name = "qucs-0.0.16";
+  name = "qucs-0.0.18";
 
   src = fetchurl {
     url = "mirror://sourceforge/qucs/${name}.tar.gz";
-    sha256 = "1h8ba84k06rix5zl5p9p414zj2facbnlf1vxwh4a1sp4h9dbfnzy";
+    sha256 = "3609a18b57485dc9f19886ac6694667f3251702175bd1cbbbea37981b2c482a7";
   };
 
-  patches = [ ./tr1-complex.patch ];
-  patchFlags = "-p0";
+  QTDIR=qt4;
 
-  buildInputs = [ qt3 libX11 ];
+  buildInputs = [ flex bison qt4 libX11 ];
 
   meta = {
     description = "Integrated circuit simulator";
diff --git a/pkgs/applications/science/logic/acgtk/default.nix b/pkgs/applications/science/logic/acgtk/default.nix
new file mode 100644
index 000000000000..41c6cf75f325
--- /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 000000000000..43ddd20b4a39
--- /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 000000000000..26ade37e4521
--- /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
+