buildDunePackage: new support function; use it to refactor some OCaml derivations

This commit is contained in:
Théo Zimmermann
2018-11-07 10:08:03 +01:00
parent 5fc73fd52e
commit 794158fcd5
64 changed files with 506 additions and 828 deletions
@@ -1,15 +1,16 @@
{ stdenv, fetchzip, findlib, dune, ocaml, configurator, cppo, lablgtk }:
stdenv.mkDerivation rec {
name = "camlimages-${version}";
{ stdenv, fetchzip, buildDunePackage, configurator, cppo, lablgtk }:
buildDunePackage rec {
pname = "camlimages";
version = "5.0.0";
src = fetchzip {
url = "https://bitbucket.org/camlspotter/camlimages/get/${version}.tar.gz";
url = "https://bitbucket.org/camlspotter/${pname}/get/${version}.tar.gz";
sha256 = "00qvwxkfnhv93yi1iq7vy3p5lxyi9xigxcq464s4ii6bmp32d998";
};
buildInputs = [ findlib dune ocaml configurator cppo lablgtk ];
buildPhase = "dune build -p camlimages";
inherit (dune) installPhase;
buildInputs = [ configurator cppo lablgtk ];
meta = with stdenv.lib; {
branch = "5.0";
homepage = https://bitbucket.org/camlspotter/camlimages;