about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2020-04-19 22:53:50 -0400
committerGitHub <noreply@github.com>2020-04-19 22:53:50 -0400
commite4db75f46dc54e55a86d5c09f752e9dc334ac076 (patch)
tree1772951b17e48deaa642fa21d911c07fdf7daff4
parent4c910ed4d6824ac83c5a51a23ddff7a581f1c118 (diff)
parentad7b7367b6191ccaca00928e0cc9633b98b27490 (diff)
downloadnixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.tar
nixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.tar.gz
nixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.tar.bz2
nixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.tar.lz
nixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.tar.xz
nixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.tar.zst
nixlib-e4db75f46dc54e55a86d5c09f752e9dc334ac076.zip
Merge pull request #84535 from bcdarwin/update-beluga
beluga: 20180403 -> unstable-2020-03-11
-rw-r--r--pkgs/applications/science/logic/beluga/default.nix38
-rw-r--r--pkgs/development/ocaml-modules/dune-build-info/default.nix17
-rw-r--r--pkgs/development/ocaml-modules/linenoise/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/sedlex/2.nix6
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
5 files changed, 46 insertions, 21 deletions
diff --git a/pkgs/applications/science/logic/beluga/default.nix b/pkgs/applications/science/logic/beluga/default.nix
index 55cee9b7e17c..44478a032b38 100644
--- a/pkgs/applications/science/logic/beluga/default.nix
+++ b/pkgs/applications/science/logic/beluga/default.nix
@@ -1,34 +1,40 @@
-{ stdenv, fetchFromGitHub, ocamlPackages, omake }:
+{ lib, fetchFromGitHub, ocamlPackages, rsync }:
 
-stdenv.mkDerivation {
-  name = "beluga-20180403";
+ocamlPackages.buildDunePackage {
+  pname = "beluga";
+  version = "unstable-2020-03-11";
 
   src = fetchFromGitHub {
     owner  = "Beluga-lang";
     repo   = "Beluga";
-    rev    = "046aa59f008be70a7c4700b723bed0214ea8b687";
-    sha256 = "0m68y0r0wdw3mg2jks68bihaww7sg305zdfnic1rkndq2cxv0mld";
+    rev    = "6133b2f572219333f304bb4f77c177592324c55b";
+    sha256 = "0sy6mi50z3mvs5z7dx38piydapk89all81rh038x3559b5fsk68q";
   };
 
-  nativeBuildInputs = with ocamlPackages; [ findlib ocamlbuild omake ];
-  buildInputs = with ocamlPackages; [ ocaml ulex ocaml_extlib ];
+  useDune2 = true;
 
-  installPhase = ''
-    mkdir -p $out
-    cp -r bin $out/
+  buildInputs = with ocamlPackages; [
+    gen sedlex_2 ocaml_extlib dune-build-info linenoise
+  ];
 
-    mkdir -p $out/share/beluga
-    cp -r tools/ examples/ $out/share/beluga
+  postPatch = ''
+    patchShebangs ./TEST ./run_harpoon_test.sh
+  '';
+
+  checkPhase = "./TEST";
+  checkInputs = [ rsync ];
+  doCheck = true;
 
+  postInstall = ''
     mkdir -p $out/share/emacs/site-lisp/beluga/
     cp -r tools/beluga-mode.el $out/share/emacs/site-lisp/beluga
   '';
 
-  meta = {
+  meta = with lib; {
     description = "A functional language for reasoning about formal systems";
     homepage    = "http://complogic.cs.mcgill.ca/beluga/";
-    license     = stdenv.lib.licenses.gpl3Plus;
-    maintainers = [ stdenv.lib.maintainers.bcdarwin ];
-    platforms   = stdenv.lib.platforms.unix;
+    license     = licenses.gpl3Plus;
+    maintainers = [ maintainers.bcdarwin ];
+    platforms   = platforms.unix;
   };
 }
diff --git a/pkgs/development/ocaml-modules/dune-build-info/default.nix b/pkgs/development/ocaml-modules/dune-build-info/default.nix
new file mode 100644
index 000000000000..3c828ebdcdb9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/dune-build-info/default.nix
@@ -0,0 +1,17 @@
+{ lib, buildDunePackage, dune_2 }:
+
+buildDunePackage rec {
+  pname = "dune-build-info";
+  inherit (dune_2) src version;
+
+  useDune2 = true;
+
+  dontAddPrefix = true;
+
+  meta = with lib; {
+    inherit (dune_2.meta) homepage;
+    description = "Embed build information inside executables";
+    maintainers = [ maintainers.bcdarwin ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/linenoise/default.nix b/pkgs/development/ocaml-modules/linenoise/default.nix
index b6b9b4163ff9..0ad277f4a07f 100644
--- a/pkgs/development/ocaml-modules/linenoise/default.nix
+++ b/pkgs/development/ocaml-modules/linenoise/default.nix
@@ -2,7 +2,7 @@
 
 buildDunePackage rec {
   pname = "linenoise";
-  version = "1.1.0";
+  version = "1.3.0";
 
   minimumOCamlVersion = "4.02";
 
@@ -10,7 +10,7 @@ buildDunePackage rec {
     owner = "fxfactorial";
     repo = "ocaml-${pname}";
     rev = "v${version}";
-    sha256 = "1h6rqfgmhmd7p5z8yhk6zkbrk4yzw1v2fgwas2b7g3hqs6y0xj0q";
+    sha256 = "0m9mm1arsawi5w5aqm57z41sy1wfxvhfgbdiw7hzy631i391144g";
   };
 
   propagatedBuildInputs = [ result ];
diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/2.nix
index 7b751ba03037..b1a892d5b804 100644
--- a/pkgs/development/ocaml-modules/sedlex/2.nix
+++ b/pkgs/development/ocaml-modules/sedlex/2.nix
@@ -38,9 +38,9 @@ buildDunePackage rec {
     sha256 = "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26";
   };
 
-  buildInputs = [ ppx_tools_versioned ocaml-migrate-parsetree ];
-
-  propagatedBuildInputs = [ gen uchar ];
+  propagatedBuildInputs = [
+    gen uchar ocaml-migrate-parsetree ppx_tools_versioned
+  ];
 
   preBuild = ''
     ln -s ${DerivedCoreProperties} src/generator/data/DerivedCoreProperties.txt
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index b976d36c7309..e6ffa73f0350 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -234,6 +234,8 @@ let
 
     dune_2 = callPackage ../development/tools/ocaml/dune/2.nix { };
 
+    dune-build-info = callPackage ../development/ocaml-modules/dune-build-info { };
+
     dune-configurator = callPackage ../development/ocaml-modules/dune-configurator { };
 
     dune-private-libs = callPackage ../development/ocaml-modules/dune-private-libs { };