push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
diff -Naur cairo-ocaml-1.2.0.ori/META cairo-ocaml-1.2.0/META
--- cairo-ocaml-1.2.0.ori/META 1970-01-01 01:00:00.000000000 +0100
+++ cairo-ocaml-1.2.0/META 2013-06-04 03:31:32.000000000 +0200
@@ -0,0 +1,12 @@
+name = "cairo-ocaml"
+description = "Bindings to the cairo library."
+version = "@VERSION@"
+archive(byte) = "cairo.cma"
+archive(native) = "cairo.cmxa"
+requires = "bigarray"
+
+package "lablgtk2" (
+ requires = "cairo lablgtk2"
+ archive(byte) = "cairo_lablgtk.cma"
+ archive(native) = "cairo_lablgtk.cmxa"
+)

View File

@@ -0,0 +1,82 @@
{
stdenv,
lib,
fetchurl,
automake,
ocaml,
autoconf,
gnum4,
pkg-config,
freetype,
lablgtk,
unzip,
cairo,
findlib,
gdk-pixbuf,
gtk2,
pango,
}:
let
pname = "ocaml-cairo";
in
if lib.versionAtLeast ocaml.version "4.06" then
throw "${pname} is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
name = "${pname}-${version}";
version = "1.2.0";
src = fetchurl {
url = "http://cgit.freedesktop.org/cairo-ocaml/snapshot/cairo-ocaml-${version}.zip";
sha256 = "0l4p9bp6kclr570mxma8wafibr1g5fsjj8h10yr4b507g0hmlh0l";
};
patches = [ ./META.patch ];
strictDeps = true;
nativeBuildInputs = [
pkg-config
unzip
ocaml
automake
gnum4
autoconf
findlib
];
buildInputs = [
freetype
lablgtk
cairo
gdk-pixbuf
gtk2
pango
];
createFindlibDestdir = true;
preConfigure = ''
aclocal -I support
autoconf
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE `pkg-config --cflags cairo gdk-pixbuf glib gtk+ pango`"
export LABLGTKDIR=${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2
cp ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2/pango.ml ./src
cp ${lablgtk}/lib/ocaml/${ocaml.version}/site-lib/lablgtk2/gaux.ml ./src
'';
postInstall = ''
cp META $out/lib/ocaml/${ocaml.version}/site-lib/cairo/
'';
makeFlags = [ "INSTALLDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/cairo" ];
meta = {
homepage = "http://cairographics.org/cairo-ocaml";
description = "Ocaml bindings for cairo library";
license = lib.licenses.gpl2;
inherit (ocaml.meta) platforms;
};
}