Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 49 lines 1.1 kB view raw
1{ lib 2, stdenv 3, fetchFromGitHub 4, which 5, ocaml 6, findlib 7, camlzip 8, extlib 9}: 10 11lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") 12 "javalib is not available for OCaml ${ocaml.version}" 13 14stdenv.mkDerivation rec { 15 pname = "ocaml${ocaml.version}-javalib"; 16 version = "3.2.2"; 17 18 src = fetchFromGitHub { 19 owner = "javalib-team"; 20 repo = "javalib"; 21 rev = version; 22 hash = "sha256-XaI7GTU/O5UEWuYX4yqaIRmEoH7FuvCg/+gtKbE/P1s="; 23 }; 24 25 nativeBuildInputs = [ which ocaml findlib ]; 26 27 strictDeps = true; 28 29 patches = [ ./configure.sh.patch ./Makefile.config.example.patch ]; 30 31 createFindlibDestdir = true; 32 33 preConfigure = "patchShebangs ./configure.sh"; 34 35 configureScript = "./configure.sh"; 36 dontAddPrefix = "true"; 37 dontAddStaticConfigureFlags = true; 38 configurePlatforms = [ ]; 39 40 propagatedBuildInputs = [ camlzip extlib ]; 41 42 meta = with lib; { 43 description = "A library that parses Java .class files into OCaml data structures"; 44 homepage = "https://javalib-team.github.io/javalib/"; 45 license = licenses.lgpl3; 46 maintainers = [ maintainers.vbgl ]; 47 inherit (ocaml.meta) platforms; 48 }; 49}