From c216448075aff5e95f586252376aa233eeee4778 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 31 Oct 2014 12:25:53 +0000 Subject: [PATCH] camlimages: update from 4.0.1 to 4.1.2 Previous version 4.0.1 is kept for OCaml 3.12 --- .../camlimages/{default.nix => 4.0.nix} | 0 .../ocaml-modules/camlimages/4.1.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 10 +++-- 3 files changed, 45 insertions(+), 3 deletions(-) rename pkgs/development/ocaml-modules/camlimages/{default.nix => 4.0.nix} (100%) create mode 100644 pkgs/development/ocaml-modules/camlimages/4.1.nix diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/4.0.nix similarity index 100% rename from pkgs/development/ocaml-modules/camlimages/default.nix rename to pkgs/development/ocaml-modules/camlimages/4.0.nix diff --git a/pkgs/development/ocaml-modules/camlimages/4.1.nix b/pkgs/development/ocaml-modules/camlimages/4.1.nix new file mode 100644 index 000000000000..f98d149c4829 --- /dev/null +++ b/pkgs/development/ocaml-modules/camlimages/4.1.nix @@ -0,0 +1,38 @@ +{stdenv, fetchurl, omake, ocaml, omake_rc1, libtiff, libjpeg, libpng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }: + +assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "4.00"; + +let + pname = "camlimages"; + version = "4.1.2"; +in + +stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://bitbucket.org/camlspotter/camlimages/get/${version}.tar.bz2"; + sha256 = "1ppddhfknpirj1vilm5dxgyp82kf7ahpvjmh7z75a1fnaqv3kpki"; + }; + + buildInputs = [ocaml omake_rc1 findlib graphicsmagick ghostscript ]; + + propagatedBuildInputs = [libtiff libjpeg libpng giflib freetype libXpm ]; + + createFindlibDestdir = true; + + buildPhase = '' + omake + ''; + + installPhase = '' + omake install + ''; + + meta = with stdenv.lib; { + homepage = https://bitbucket.org/camlspotter/camlimages; + description = "OCaml image processing library"; + license = licenses.lgpl2; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f35b7ef1da62..7e93964838d2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3532,10 +3532,12 @@ let camomile_0_8_2 = callPackage ../development/ocaml-modules/camomile/0.8.2.nix { }; camomile = callPackage ../development/ocaml-modules/camomile { }; - camlimages = callPackage ../development/ocaml-modules/camlimages { + camlimages_4_0 = callPackage ../development/ocaml-modules/camlimages/4.0.nix { libpng = libpng12; giflib = giflib_4_1; }; + camlimages_4_1 = callPackage ../development/ocaml-modules/camlimages/4.1.nix {}; + camlimages = camlimages_4_1; biniou = callPackage ../development/ocaml-modules/biniou { }; @@ -3720,7 +3722,8 @@ let // { lablgtk = ocamlPackages_3_10_0.lablgtk_2_14; }; ocamlPackages_3_11_2 = (mkOcamlPackages ocaml_3_11_2 pkgs.ocamlPackages_3_11_2) // { lablgtk = ocamlPackages_3_11_2.lablgtk_2_14; }; - ocamlPackages_3_12_1 = mkOcamlPackages ocaml_3_12_1 pkgs.ocamlPackages_3_12_1; + ocamlPackages_3_12_1 = (mkOcamlPackages ocaml_3_12_1 pkgs.ocamlPackages_3_12_1) + // { camlimages = ocamlPackages_3_12_1.camlimages_4_0; }; ocamlPackages_4_00_1 = mkOcamlPackages ocaml_4_00_1 pkgs.ocamlPackages_4_00_1; ocamlPackages_4_01_0 = mkOcamlPackages ocaml_4_01_0 pkgs.ocamlPackages_4_01_0; ocamlPackages_4_02_0 = mkOcamlPackages ocaml_4_02_0 pkgs.ocamlPackages_4_02_0; @@ -5195,9 +5198,10 @@ let glpk = callPackage ../development/libraries/glpk { }; glsurf = callPackage ../applications/science/math/glsurf { - inherit (ocamlPackages) lablgl findlib camlimages ocaml_mysql mlgmp; + inherit (ocamlPackages) lablgl findlib ocaml_mysql mlgmp; libpng = libpng12; giflib = giflib_4_1; + camlimages = ocamlPackages.camlimages_4_0; }; gmime = callPackage ../development/libraries/gmime { };