about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/yojson
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-02-13 10:53:48 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-02-20 10:41:53 +0100
commitb60b304cefa1f29dfb791372c1699fceb47c27a6 (patch)
tree55ec8cbe8f3725370a65c9a3dd3b857b7bfdd5f8 /pkgs/development/ocaml-modules/yojson
parent32767d139f28fd3c00d687c04ec406258f7341e7 (diff)
ocamlPackages.yojson: 1.4.1 -> 1.6.0
Diffstat (limited to 'pkgs/development/ocaml-modules/yojson')
-rw-r--r--pkgs/development/ocaml-modules/yojson/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/yojson/default.nix b/pkgs/development/ocaml-modules/yojson/default.nix
index dfef72835cc1f..75810a79e280b 100644
--- a/pkgs/development/ocaml-modules/yojson/default.nix
+++ b/pkgs/development/ocaml-modules/yojson/default.nix
@@ -2,15 +2,16 @@
 let
   pname = "yojson";
   param =
-  if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
-    version = "1.4.1";
-    sha256 = "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9";
+  if stdenv.lib.versionAtLeast ocaml.version "4.02" then rec {
+    version = "1.6.0";
+    url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz";
+    sha256 = "1h73zkgqs6cl9y7p2l0cgjwyqa1fzcrnzv3k6w7wyq2p1q5m84xh";
     buildInputs = [ dune ];
     extra = { inherit (dune) installPhase; };
-  } else {
+  } else rec {
     version = "1.2.3";
+    url = "https://github.com/ocaml-community/yojson/archive/v${version}.tar.gz";
     sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl";
-    buildInputs = [];
     extra = {
       createFindlibDestdir = true;
 
@@ -25,11 +26,10 @@ stdenv.mkDerivation ({
   name = "ocaml${ocaml.version}-${pname}-${param.version}";
 
   src = fetchzip {
-    url = "https://github.com/mjambon/${pname}/archive/v${param.version}.tar.gz";
-    inherit (param) sha256;
+    inherit (param) url sha256;
   };
 
-  buildInputs = [ ocaml findlib ] ++ param.buildInputs;
+  buildInputs = [ ocaml findlib ] ++ (param.buildInputs or []);
 
   propagatedBuildInputs = [ cppo easy-format biniou ];