Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 51 lines 1.7 kB view raw
1{ lib, stdenv, fetchFromGitHub, fetchpatch, buildDunePackage, pkg-config, gsl, darwin, dune-configurator }: 2 3buildDunePackage rec { 4 pname = "gsl"; 5 version = "1.24.3"; 6 7 minimalOCamlVersion = "4.12"; 8 9 src = fetchFromGitHub { 10 owner = "mmottl"; 11 repo = "gsl-ocaml"; 12 rev = version; 13 hash = "sha256-I+u7lFEredt8ZLiba8x904eTgSUdZq82/e82B+/GIlo="; 14 }; 15 16 patches = [ 17 # Switched to Dune lang 2.7 18 (fetchpatch { 19 url = "https://github.com/mmottl/gsl-ocaml/commit/be0f6933f16fea6d6fb2e39178816974be4c3724.patch"; 20 sha256 = "sha256-G/4JT8XPYw+oNJEwJ9zRdUBwtNUHL+T8/htCb3qfuT8="; 21 }) 22 # Fix dune rules 23 (fetchpatch { 24 url = "https://github.com/mmottl/gsl-ocaml/commit/0b38a22d9813de27eab5caafafeabd945f298b5e.patch"; 25 sha256 = "sha256-S6OUDase2kR7V6fizaev5huqEAIM5QOkx3n18rj4y3w="; 26 }) 27 # Updated opam file 28 (fetchpatch { 29 url = "https://github.com/mmottl/gsl-ocaml/commit/b749455b76501c9e3623e05d659565eab7292602.patch"; 30 sha256 = "sha256-/GACjI3cRCApyGyk1kQp0rB/Hae8DIR9zs6q9KiS1ZQ="; 31 }) 32 # Used new OCaml 4.12 C-macros 33 (fetchpatch { 34 url = "https://github.com/mmottl/gsl-ocaml/commit/cca79ea56a7ee83a4c67b432decdaef3de8c9d30.patch"; 35 sha256 = "sha256-bsIKkvj9W8oAYSvP6ZfbqSgt5fSirc780O08WBhVRmI="; 36 }) 37 ]; 38 39 duneVersion = "3"; 40 41 nativeBuildInputs = [ pkg-config ]; 42 buildInputs = [ dune-configurator gsl ]; 43 propagatedBuildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Accelerate ]; 44 45 meta = with lib; { 46 homepage = "https://mmottl.github.io/gsl-ocaml/"; 47 description = "OCaml bindings to the GNU Scientific Library"; 48 license = licenses.gpl3Plus; 49 maintainers = with maintainers; [ vbgl ]; 50 }; 51}