Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 48 lines 1.2 kB view raw
1{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib, javalib }: 2 3let 4 pname = "sawja"; 5 version = "1.5.12"; 6in 7 8lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") 9 "${pname} is not available for OCaml ${ocaml.version}" 10 11stdenv.mkDerivation { 12 13 pname = "ocaml${ocaml.version}-${pname}"; 14 15 inherit version; 16 17 src = fetchFromGitHub { 18 owner = "javalib-team"; 19 repo = pname; 20 rev = version; 21 hash = "sha256-G1W8/G0TEcldnFnH/NAb9a6ZSGGP2fWTM47lI8bBHnw="; 22 }; 23 24 nativeBuildInputs = [ which ocaml findlib ]; 25 26 strictDeps = true; 27 28 patches = [ ./configure.sh.patch ./Makefile.config.example.patch ]; 29 30 createFindlibDestdir = true; 31 32 preConfigure = "patchShebangs ./configure.sh"; 33 34 configureScript = "./configure.sh"; 35 dontAddPrefix = "true"; 36 dontAddStaticConfigureFlags = true; 37 configurePlatforms = []; 38 39 propagatedBuildInputs = [ javalib ]; 40 41 meta = with lib; { 42 description = "A library written in OCaml, relying on Javalib to provide a high level representation of Java bytecode programs"; 43 homepage = "http://sawja.inria.fr/"; 44 license = licenses.gpl3Plus; 45 maintainers = [ maintainers.vbgl ]; 46 inherit (ocaml.meta) platforms; 47 }; 48}