mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
ocamlPackages.cstruct: remove at 1.9.0 for OCaml < 4.02
This removes unreachable code.
This commit is contained in:
parent
02d1feffd8
commit
0ae4fd5bc3
|
@ -1,36 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, ocaml, ocamlbuild, ocplib-endian, sexplib, findlib, ppx_tools
|
||||
, async ? null, lwt ? null
|
||||
}:
|
||||
|
||||
assert lib.versionAtLeast ocaml.version "4.01";
|
||||
|
||||
let version = "1.9.0"; in
|
||||
|
||||
let opt = b: "--${if b != null then "en" else "dis"}able"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ocaml${ocaml.version}-cstruct-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mirage";
|
||||
repo = "ocaml-cstruct";
|
||||
rev = "v${version}";
|
||||
sha256 = "1c1j21zgmxi9spq23imy7byn50qr7hlds1cfpzxlsx9dp309jngy";
|
||||
};
|
||||
|
||||
configureFlags = [ "${opt lwt}-lwt" "${opt async}-async" "${opt ppx_tools}-ppx" ];
|
||||
|
||||
buildInputs = [ ocaml findlib ocamlbuild ppx_tools lwt async ];
|
||||
propagatedBuildInputs = [ ocplib-endian sexplib ];
|
||||
|
||||
createFindlibDestdir = true;
|
||||
dontStrip = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/mirage/ocaml-cstruct";
|
||||
description = "Map OCaml arrays onto C-like structs";
|
||||
license = lib.licenses.isc;
|
||||
maintainers = [ maintainers.vbgl maintainers.ericbmerritt ];
|
||||
platforms = ocaml.meta.platforms or [];
|
||||
};
|
||||
}
|
|
@ -215,10 +215,7 @@ let
|
|||
|
||||
csexp = callPackage ../development/ocaml-modules/csexp { };
|
||||
|
||||
cstruct =
|
||||
if lib.versionAtLeast ocaml.version "4.2"
|
||||
then callPackage ../development/ocaml-modules/cstruct {}
|
||||
else callPackage ../development/ocaml-modules/cstruct/1.9.0.nix { };
|
||||
cstruct = callPackage ../development/ocaml-modules/cstruct {};
|
||||
|
||||
cstruct-lwt = callPackage ../development/ocaml-modules/cstruct/lwt.nix { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue