2017-06-08 10:21:37 +02:00
|
|
|
{ stdenv, fetchzip, atk, cairo, dmd, gdk_pixbuf, gnome3, gst_all_1, librsvg
|
2018-12-26 00:15:46 +01:00
|
|
|
, pango, pkgconfig, which, vte }:
|
2017-06-08 10:21:37 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gtkd-${version}";
|
2018-12-16 06:24:31 +01:00
|
|
|
version = "3.8.4";
|
2017-06-08 10:21:37 +02:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://gtkd.org/Downloads/sources/GtkD-${version}.zip";
|
2018-12-16 06:24:31 +01:00
|
|
|
sha256 = "0q2kf1jwr89i8ajjzyf3b4bbla33djvnwrvljq17y206q7qknfyz";
|
2017-06-08 10:21:37 +02:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ dmd pkgconfig which ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
atk cairo gdk_pixbuf glib gstreamer gst_plugins_base gtk3 gtksourceview
|
|
|
|
libgda libpeas librsvg pango vte
|
|
|
|
];
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteAll ${./paths.d} generated/gtkd/gtkd/paths.d
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace src/cairo/c/functions-compiletime.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libcairo.so.2 ${cairo}/lib/libcairo.so.2 \
|
|
|
|
--replace libcairo.dylib ${cairo}/lib/libcairo.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace src/cairo/c/functions-runtime.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libcairo.so.2 ${cairo}/lib/libcairo.so.2 \
|
|
|
|
--replace libcairo.dylib ${cairo}/lib/libcairo.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/gdkpixbuf/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libgdk_pixbuf-2.0.so.0 ${gdk_pixbuf}/lib/libgdk_pixbuf-2.0.so.0 \
|
|
|
|
--replace libgdk_pixbuf-2.0.0.dylib ${gdk_pixbuf}/lib/libgdk_pixbuf-2.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/atk/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libatk-1.0.so.0 ${atk}/lib/libatk-1.0.so.0 \
|
|
|
|
--replace libatk-1.0.0.dylib ${atk}/lib/libatk-1.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/pango/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 \
|
|
|
|
--replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \
|
|
|
|
--replace libpango-1.0.0.dylib ${pango.out}/lib/libpango-1.0.0.dylib \
|
|
|
|
--replace libpangocairo-1.0.0.dylib ${pango.out}/lib/libpangocairo-1.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/gobject/c/functions.d \
|
2018-04-06 01:44:25 +02:00
|
|
|
--replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \
|
|
|
|
--replace libgobject-2.0.0.dylib ${glib.out}/lib/libgobject-2.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/rsvg/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace librsvg-2.so.2 ${librsvg}/lib/librsvg-2.so.2 \
|
|
|
|
--replace librsvg-2.2.dylib ${librsvg}/lib/librsvg-2.2.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/cairo/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libcairo.so.2 ${cairo}/lib/libcairo.so.2 \
|
|
|
|
--replace libcairo.dylib ${cairo}/lib/libcairo.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/gdk/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libgdk-3.so.0 ${gtk3}/lib/libgdk-3.so.0 \
|
|
|
|
--replace libgdk-3.0.dylib ${gtk3}/lib/libgdk-3.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/peas/peas/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libpeas-1.0.so.0 ${libpeas}/lib/libpeas-1.0.so.0 \
|
|
|
|
--replace libpeas-gtk-1.0.so.0 ${libpeas}/lib/libpeas-gtk-1.0.so.0 \
|
|
|
|
--replace libpeas-1.0.0.dylib ${libpeas}/lib/libpeas-1.0.0.dylib \
|
|
|
|
--replace gtk-1.0.0.dylib ${libpeas}/lib/gtk-1.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/vte/vte/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libvte-2.91.so.0 ${vte}/lib/libvte-2.91.so.0 \
|
|
|
|
--replace libvte-2.91.0.dylib ${vte}/lib/libvte-2.91.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gstreamer/gstinterfaces/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libgstvideo-1.0.so.0 ${gst_plugins_base}/lib/libgstvideo-1.0.so.0 \
|
|
|
|
--replace libgstvideo-1.0.0.dylib ${gst_plugins_base}/lib/libgstvideo-1.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/sourceview/gsv/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libgtksourceview-3.0.so.1 ${gtksourceview}/lib/libgtksourceview-3.0.so.1 \
|
|
|
|
--replace libgtksourceview-3.0.1.dylib ${gtksourceview}/lib/libgtksourceview-3.0.1.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/glib/c/functions.d \
|
2018-04-06 01:44:25 +02:00
|
|
|
--replace libglib-2.0.so.0 ${glib.out}/lib/libglib-2.0.so.0 \
|
|
|
|
--replace libgmodule-2.0.so.0 ${glib.out}/lib/libgmodule-2.0.so.0 \
|
|
|
|
--replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \
|
|
|
|
--replace libglib-2.0.0.dylib ${glib.out}/lib/libglib-2.0.0.dylib \
|
|
|
|
--replace libgmodule-2.0.0.dylib ${glib.out}/lib/libgmodule-2.0.0.dylib \
|
|
|
|
--replace libgobject-2.0.0.dylib ${glib.out}/lib/libgobject-2.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/gio/c/functions.d \
|
2018-04-06 01:44:25 +02:00
|
|
|
--replace libgio-2.0.so.0 ${glib.out}/lib/libgio-2.0.so.0 \
|
|
|
|
--replace libgio-2.0.0.dylib ${glib.out}/lib/libgio-2.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gstreamer/gstreamer/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libgstreamer-1.0.so.0 ${gstreamer}/lib/libgstreamer-1.0.so.0 \
|
|
|
|
--replace libgstreamer-1.0.0.dylib ${gstreamer}/lib/libgstreamer-1.0.0.dylib
|
2018-06-14 22:02:58 +02:00
|
|
|
substituteInPlace generated/gtkd/gtk/c/functions.d \
|
2017-06-08 10:21:37 +02:00
|
|
|
--replace libgdk-3.so.0 ${gtk3}/lib/libgdk-3.so.0 \
|
|
|
|
--replace libgtk-3.so.0 ${gtk3}/lib/libgtk-3.so.0 \
|
|
|
|
--replace libgdk-3.0.dylib ${gtk3}/lib/libgdk-3.0.dylib \
|
|
|
|
--replace libgtk-3.0.dylib ${gtk3}/lib/libgtk-3.0.dylib
|
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = "prefix=$(out)";
|
|
|
|
|
2018-05-30 09:30:50 +02:00
|
|
|
# Workaround for https://github.com/NixOS/nixpkgs/issues/40397
|
|
|
|
# Remove after update to binutils 2.31
|
|
|
|
dontStrip = true;
|
|
|
|
|
2017-06-08 10:21:37 +02:00
|
|
|
inherit atk cairo gdk_pixbuf librsvg pango;
|
2018-12-26 00:15:46 +01:00
|
|
|
inherit (gnome3) glib gtk3 gtksourceview libgda libpeas;
|
2017-06-08 10:21:37 +02:00
|
|
|
inherit (gst_all_1) gstreamer;
|
|
|
|
gst_plugins_base = gst_all_1.gst-plugins-base;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "D binding and OO wrapper for GTK+";
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://gtkd.org;
|
2017-12-05 23:20:11 +01:00
|
|
|
license = licenses.lgpl3Plus;
|
2017-06-08 10:21:37 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|