about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorIvan Jager <aij+github.com@mrph.org>2018-08-15 03:45:42 -0500
committerxeji <36407913+xeji@users.noreply.github.com>2018-08-15 10:45:42 +0200
commitef98b96356fe0f3c7029ac2b0329c77a065673bc (patch)
tree199e3b053b5903ea6186e082fceb1473e4bb884d /pkgs/development/ocaml-modules
parente2c98528e93594512261c18f46474bcec1663581 (diff)
downloadnixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.tar
nixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.tar.gz
nixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.tar.bz2
nixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.tar.lz
nixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.tar.xz
nixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.tar.zst
nixlib-ef98b96356fe0f3c7029ac2b0329c77a065673bc.zip
atd: 1.12.0 -> 2.0.0 (#45046)
atdgen is now part of atd
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/atd/default.nix38
-rw-r--r--pkgs/development/ocaml-modules/atdgen/default.nix25
2 files changed, 13 insertions, 50 deletions
diff --git a/pkgs/development/ocaml-modules/atd/default.nix b/pkgs/development/ocaml-modules/atd/default.nix
index af52bd9aaafa..52a1fc36921c 100644
--- a/pkgs/development/ocaml-modules/atd/default.nix
+++ b/pkgs/development/ocaml-modules/atd/default.nix
@@ -1,41 +1,29 @@
-{ stdenv, menhir, easy-format, ocaml, findlib, fetchurl, jbuilder, which }:
-
-let param =
-  if stdenv.lib.versionAtLeast ocaml.version "4.02"
-  then {
-    version = "1.12.0";
-    sha256 = "1pcd4fqbilv8zm2mc1nj2s26vc5y8vnisg1q1y6bjx23wxidb09y";
-    buildPhase = "jbuilder build -p atd";
-    inherit (jbuilder) installPhase;
-  } else {
-    version = "1.1.2";
-    sha256 = "0ef10c63192aed75e9a4274e89c5f9ca27efb1ef230d9949eda53ad4a9a37291";
-    buildPhase = "";
-    installPhase = ''
-      mkdir -p $out/bin
-      make PREFIX=$out install
-    '';
-  };
-in
+{ stdenv, menhir, easy-format, ocaml, findlib, fetchFromGitHub, jbuilder, which, biniou, yojson }:
 
 stdenv.mkDerivation rec {
-  inherit (param) version buildPhase installPhase;
+  version = "2.0.0";
+
   name = "ocaml${ocaml.version}-atd-${version}";
 
-  src = fetchurl {
-    url = "https://github.com/mjambon/atd/archive/v${version}.tar.gz";
-    inherit (param) sha256;
+  src = fetchFromGitHub {
+    owner = "mjambon";
+    repo = "atd";
+    rev = version;
+    sha256 = "0alzmk97rxg7s6irs9lvf89dy9n3r769my5n4j9p9qyigcdgjaia";
   };
 
   createFindlibDestdir = true;
 
   buildInputs = [ which jbuilder ocaml findlib menhir ];
-  propagatedBuildInputs = [ easy-format ];
+  propagatedBuildInputs = [ easy-format biniou yojson ];
+
+  buildPhase = "jbuilder build";
+  inherit (jbuilder) installPhase;
 
   meta = with stdenv.lib; {
     homepage = https://github.com/mjambon/atd;
     description = "Syntax for cross-language type definitions";
     license = licenses.bsd3;
-    maintainers = [ maintainers.jwilberding ];
+    maintainers = with maintainers; [ aij jwilberding ];
   };
 }
diff --git a/pkgs/development/ocaml-modules/atdgen/default.nix b/pkgs/development/ocaml-modules/atdgen/default.nix
deleted file mode 100644
index 291dd03c8d11..000000000000
--- a/pkgs/development/ocaml-modules/atdgen/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{stdenv, atd, yojson, biniou, buildOcaml, fetchurl, which}:
-
-buildOcaml rec {
-  name = "atdgen";
-  version = "1.6.0";
-
-  src = fetchurl {
-    url = "https://github.com/mjambon/atdgen/archive/v${version}.tar.gz";
-    sha256 = "1icdxgb7qqq1pcbfqi0ikryiwaljd594z3acyci8g3bnlq0yc7zn";
-  };
-
-  installPhase = ''
-    mkdir -p $out/bin
-    make PREFIX=$out install
-  '';
-
-  buildInputs = [ which atd biniou yojson ];
-
-  meta = with stdenv.lib; {
-    homepage = https://github.com/mjambon/atdgen;
-    description = "Generates optimized boilerplate OCaml code for JSON and Biniou IO from type definitions";
-    license = licenses.bsd3;
-    maintainers = [ maintainers.jwilberding ];
-  };
-}