ocamlPackages.yojson: remove legacy version 1.2.3

authored by Vincent Laporte and committed by Vincent Laporte d89015db cf5f275d

+10 -36
+10 -36
pkgs/development/ocaml-modules/yojson/default.nix
··· 1 - { lib, stdenv, fetchzip, ocaml, findlib, dune_2, cppo, easy-format, biniou }: 2 - let 3 - pname = "yojson"; 4 - param = 5 - if lib.versionAtLeast ocaml.version "4.02" then rec { 6 - version = "1.7.0"; 7 - url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz"; 8 - sha256 = "08llz96if8bcgnaishf18si76cv11zbkni0aldb54k3cn7ipiqvd"; 9 - nativeBuildInputs = [ dune_2 ]; 10 - extra = { 11 - installPhase = '' 12 - dune install --prefix $out --libdir $OCAMLFIND_DESTDIR ${pname} 13 - ''; 14 - }; 15 - } else rec { 16 - version = "1.2.3"; 17 - url = "https://github.com/ocaml-community/yojson/archive/v${version}.tar.gz"; 18 - sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl"; 19 - extra = { 20 - createFindlibDestdir = true; 21 - 22 - makeFlags = [ "PREFIX=$(out)" ]; 23 - 24 - preBuild = "mkdir $out/bin"; 25 - }; 26 - }; 27 - in 28 - stdenv.mkDerivation ({ 1 + { lib, fetchurl, buildDunePackage, cppo, easy-format, biniou }: 29 2 30 - name = "ocaml${ocaml.version}-${pname}-${param.version}"; 3 + buildDunePackage rec { 4 + pname = "yojson"; 5 + version = "1.7.0"; 6 + useDune2 = true; 31 7 32 - src = fetchzip { 33 - inherit (param) url sha256; 8 + src = fetchurl { 9 + url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz"; 10 + sha256 = "1iich6323npvvs8r50lkr4pxxqm9mf6w67cnid7jg1j1g5gwcvv5"; 34 11 }; 35 12 36 - nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []); 37 - propagatedNativeBuildInputs = [ cppo ]; 13 + nativeBuildInputs = [ cppo ]; 38 14 propagatedBuildInputs = [ easy-format biniou ]; 39 - configurePlatforms = []; 40 15 41 16 meta = with lib; { 42 17 description = "An optimized parsing and printing library for the JSON format"; 43 18 homepage = "https://github.com/ocaml-community/${pname}"; 44 19 license = licenses.bsd3; 45 20 maintainers = [ maintainers.vbgl ]; 46 - platforms = ocaml.meta.platforms or []; 47 21 }; 48 - } // param.extra) 22 + }