diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/ocaml-modules/lablgtk | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/lablgtk')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix | 41 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix | 46 |
2 files changed, 87 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix b/nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix new file mode 100644 index 000000000000..55a4a02f7ffc --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/lablgtk/2.14.0.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview, camlp4 }: + +if stdenv.lib.versionAtLeast ocaml.version "4.04" +then throw "lablgtk-2.14 is not available for OCaml ${ocaml.version}" else + +let + pname = "lablgtk"; +in + +stdenv.mkDerivation (rec { + name = "${pname}-${version}"; + version = "2.14.0"; + + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/561/${name}.tar.gz"; + sha256 = "1fnh0amm7lwgyjdhmlqgsp62gwlar1140425yc1j6inwmgnsp0a9"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview camlp4 ]; + + configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; + buildFlags = "world"; + + preInstall = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib + export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH + ''; + + meta = { + branch = "2.14"; + platforms = ocaml.meta.platforms or []; + maintainers = [ + stdenv.lib.maintainers.z77z + stdenv.lib.maintainers.roconnor + ]; + homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html; + description = "LablGTK is is an Objective Caml interface to gtk+"; + license = stdenv.lib.licenses.lgpl21Plus; + }; +}) diff --git a/nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix b/nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix new file mode 100644 index 000000000000..6b01929db768 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }: + +let param = + let check = stdenv.lib.versionAtLeast ocaml.version; in + if check "4.06" then { + version = "2.18.6"; + url = https://forge.ocamlcore.org/frs/download.php/1726/lablgtk-2.18.6.tar.gz; + sha256 = "1y38fdvswy6hmppm65qvgdk4pb3ghhnvz7n4ialf46340r1s5p2d"; + } else if check "3.12" then { + version = "2.18.5"; + url = https://forge.ocamlcore.org/frs/download.php/1627/lablgtk-2.18.5.tar.gz; + sha256 = "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"; + } else throw "lablgtk is not available for OCaml ${ocaml.version}"; +in + +stdenv.mkDerivation rec { + name = "lablgtk-${version}"; + inherit (param) version; + + src = fetchurl { + inherit (param) url sha256; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview ]; + + configureFlags = [ "--with-libdir=$(out)/lib/ocaml/${ocaml.version}/site-lib" ]; + buildFlags = "world"; + + preInstall = '' + mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib + export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH + ''; + + dontStrip = true; + + meta = with stdenv.lib; { + platforms = ocaml.meta.platforms or []; + maintainers = with maintainers; [ + z77z roconnor vbgl + ]; + homepage = http://lablgtk.forge.ocamlcore.org/; + description = "An OCaml interface to gtk+"; + license = licenses.lgpl21Plus; + }; +} |