1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-23 16:02:20 -04:00
nixpkgs/pkgs/development/ocaml-modules/xmlm/default.nix
Anders Kaseorg 6920d8ca42 treewide: Simplify negated uses of versionAtLeast, versionOlder
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-04-25 13:35:24 -07:00

35 lines
908 B
Nix

{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
let
pname = "xmlm";
webpage = "https://erratique.ch/software/${pname}";
in
if lib.versionOlder ocaml.version "4.02"
then throw "xmlm is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "1.3.0";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n";
};
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ topkg ];
strictDeps = true;
inherit (topkg) buildPhase installPhase;
meta = with lib; {
description = "An OCaml streaming codec to decode and encode the XML data format";
homepage = webpage;
platforms = ocaml.meta.platforms or [];
maintainers = [ maintainers.vbgl ];
license = licenses.bsd3;
};
}