at master 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6 pkg-config, 7 mono, 8 glib, 9 pango, 10 gtk3, 11 libxml2, 12 monoDLLFixer, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "gtk-sharp"; 17 version = "2.99.3"; 18 19 builder = ./builder.sh; 20 src = fetchurl { 21 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 22 sha256 = "18n3l9zcldyvn4lwi8izd62307mkhz873039nl6awrv285qzah34"; 23 }; 24 25 nativeBuildInputs = [ pkg-config ]; 26 buildInputs = [ 27 mono 28 glib 29 pango 30 gtk3 31 libxml2 32 ]; 33 34 env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; 35 36 patches = [ 37 # Fixes MONO_PROFILE_ENTER_LEAVE undeclared when compiling against newer versions of mono. 38 # @see https://github.com/mono/gtk-sharp/pull/266 39 (fetchpatch { 40 name = "MONO_PROFILE_ENTER_LEAVE.patch"; 41 url = "https://github.com/mono/gtk-sharp/commit/401df51bc461de93c1a78b6a7a0d5adc63cf186c.patch"; 42 sha256 = "0hrkcr5a7wkixnyp60v4d6j3arsb63h54rd30lc5ajfjb3p92kcf"; 43 }) 44 # @see https://github.com/mono/gtk-sharp/pull/263 45 (fetchpatch { 46 name = "disambiguate_Gtk.Range.patch"; 47 url = "https://github.com/mono/gtk-sharp/commit/a00552ad68ae349e89e440dca21b86dbd6bccd30.patch"; 48 sha256 = "1ylplr9g9x7ybsgrydsgr6p3g7w6i46yng1hnl3afgn4vj45rag2"; 49 }) 50 ]; 51 52 dontStrip = true; 53 54 inherit monoDLLFixer; 55 56 passthru = { 57 inherit gtk3; 58 }; 59 60 meta = { 61 platforms = lib.platforms.linux; 62 }; 63}