Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 32 lines 852 B view raw
1{ lib, stdenv, fetchFromGitHub, which, ocaml, findlib }: 2 3if lib.versionOlder ocaml.version "4.10" 4then throw "camlpdf is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation rec { 8 version = "2.5"; 9 pname = "ocaml${ocaml.version}-camlpdf"; 10 11 src = fetchFromGitHub { 12 owner = "johnwhitington"; 13 repo = "camlpdf"; 14 rev = "v${version}"; 15 sha256 = "sha256:1qmsa0xgi960y7r20mvf8hxiiml7l1908s4dm7nq262f19w51gsl"; 16 }; 17 18 nativeBuildInputs = [ which ocaml findlib ]; 19 20 strictDeps = true; 21 22 preInstall = '' 23 mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs 24 ''; 25 26 meta = with lib; { 27 description = "An OCaml library for reading, writing and modifying PDF files"; 28 homepage = "https://github.com/johnwhitington/camlpdf"; 29 license = licenses.lgpl21Plus; 30 maintainers = with maintainers; [vbgl]; 31 }; 32}