ocamlPackages.yojson: remove legacy version 1.2.3
This commit is contained in:
parent
cf5f275d23
commit
d89015db44
|
@ -1,48 +1,22 @@
|
||||||
{ lib, stdenv, fetchzip, ocaml, findlib, dune_2, cppo, easy-format, biniou }:
|
{ lib, fetchurl, buildDunePackage, cppo, easy-format, biniou }:
|
||||||
let
|
|
||||||
|
buildDunePackage rec {
|
||||||
pname = "yojson";
|
pname = "yojson";
|
||||||
param =
|
version = "1.7.0";
|
||||||
if lib.versionAtLeast ocaml.version "4.02" then rec {
|
useDune2 = true;
|
||||||
version = "1.7.0";
|
|
||||||
|
src = fetchurl {
|
||||||
url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz";
|
url = "https://github.com/ocaml-community/yojson/releases/download/${version}/yojson-${version}.tbz";
|
||||||
sha256 = "08llz96if8bcgnaishf18si76cv11zbkni0aldb54k3cn7ipiqvd";
|
sha256 = "1iich6323npvvs8r50lkr4pxxqm9mf6w67cnid7jg1j1g5gwcvv5";
|
||||||
nativeBuildInputs = [ dune_2 ];
|
|
||||||
extra = {
|
|
||||||
installPhase = ''
|
|
||||||
dune install --prefix $out --libdir $OCAMLFIND_DESTDIR ${pname}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
} else rec {
|
|
||||||
version = "1.2.3";
|
|
||||||
url = "https://github.com/ocaml-community/yojson/archive/v${version}.tar.gz";
|
|
||||||
sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl";
|
|
||||||
extra = {
|
|
||||||
createFindlibDestdir = true;
|
|
||||||
|
|
||||||
makeFlags = [ "PREFIX=$(out)" ];
|
|
||||||
|
|
||||||
preBuild = "mkdir $out/bin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation ({
|
|
||||||
|
|
||||||
name = "ocaml${ocaml.version}-${pname}-${param.version}";
|
|
||||||
|
|
||||||
src = fetchzip {
|
|
||||||
inherit (param) url sha256;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ ocaml findlib ] ++ (param.nativeBuildInputs or []);
|
nativeBuildInputs = [ cppo ];
|
||||||
propagatedNativeBuildInputs = [ cppo ];
|
|
||||||
propagatedBuildInputs = [ easy-format biniou ];
|
propagatedBuildInputs = [ easy-format biniou ];
|
||||||
configurePlatforms = [];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "An optimized parsing and printing library for the JSON format";
|
description = "An optimized parsing and printing library for the JSON format";
|
||||||
homepage = "https://github.com/ocaml-community/${pname}";
|
homepage = "https://github.com/ocaml-community/${pname}";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = [ maintainers.vbgl ];
|
maintainers = [ maintainers.vbgl ];
|
||||||
platforms = ocaml.meta.platforms or [];
|
|
||||||
};
|
};
|
||||||
} // param.extra)
|
}
|
||||||
|
|
Loading…
Reference in a new issue