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