nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 35 lines 999 B view raw
1{ stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }: 2 3if lib.versionOlder ocaml.version "4.02" 4then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}" 5else 6 7stdenv.mkDerivation rec { 8 pname = "ocaml${ocaml.version}-ocp-ocamlres"; 9 version = "0.4"; 10 src = fetchFromGitHub { 11 owner = "OCamlPro"; 12 repo = "ocp-ocamlres"; 13 rev = "v${version}"; 14 sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn"; 15 }; 16 17 nativeBuildInputs = [ ocaml findlib ]; 18 buildInputs = [ astring pprint ]; 19 20 strictDeps = true; 21 22 createFindlibDestdir = true; 23 24 installFlags = [ "BINDIR=$(out)/bin" ]; 25 preInstall = "mkdir -p $out/bin"; 26 27 meta = { 28 description = "A simple tool and library to embed files and directories inside OCaml executables"; 29 homepage = "https://www.typerex.org/ocp-ocamlres.html"; 30 license = lib.licenses.lgpl3Plus; 31 maintainers = [ lib.maintainers.vbgl ]; 32 mainProgram = "ocp-ocamlres"; 33 inherit (ocaml.meta) platforms; 34 }; 35}