@ -3,7 +3,9 @@
, fetchpatch
, pkgconfig
, gettext
, perl
, meson
, ninja
, python3
, makeWrapper
, shared-mime-info
, isocodes
@ -22,7 +24,7 @@
, libxkbcommon
, gmp
, gnome3
, autoreconfHook
, hicolor-icon-theme
, gsettings-desktop-schemas
, x11Support ? stdenv . isLinux
, waylandSupport ? stdenv . isLinux
@ -42,14 +44,16 @@ with stdenv.lib;
stdenv . mkDerivation rec {
pname = " g t k + 3 " ;
version = " 3 . 2 4 . 8 " ;
version = " 3 . 2 4 . 1 0 " ;
outputs = [ " o u t " " d e v " ] ;
outputBin = " d e v " ;
setupHook = ./gtk3-setup-hook.sh ;
src = fetchurl {
url = " m i r r o r : / / g n o m e / s o u r c e s / g t k + / ${ stdenv . lib . versions . majorMinor version } / g t k + - ${ version } . t a r . x z " ;
sha256 = " 1 6 f 7 1 b b k h w h n d c s r p y h j i a 3 b 7 7 c b 5 k s f 5 c 4 5 l y f g w s 4 p k g g 6 4 s b 6 " ;
sha256 = " 0 0 q v q 1 r 9 6 i k d a l v 7 x z g n g 1 k a d 9 i 0 r c a h q k 0 1 g w h x l 3 x r w 8 3 z 3 a 1 m " ;
} ;
patches = [
@ -66,13 +70,36 @@ stdenv.mkDerivation rec {
./3.0-darwin-x11.patch
] ;
mesonFlags = [
" - D t e s t s = f a l s e "
] ;
postPatch = ''
files = (
build-aux/meson/post-install.py
demos/gtk-demo/geninclude.py
gdk/broadway/gen-c-array.py
gdk/gen-gdk-gresources-xml.py
gtk/cursor/dnd-copy.png
gtk/gen-gtk-gresources-xml.py
gtk/gen-rc.py
gtk/gentypefuncs.py
)
chmod + x '' ${ files [ @ ] }
patchShebangs '' ${ files [ @ ] }
'' ;
nativeBuildInputs = [
autoreconfHook
gettext
gobject-introspection
hicolor-icon-theme # setup-hook
makeWrapper
perl
meson
ninja
pkgconfig
python3
setupHook
] ;
buildInputs = [
@ -109,27 +136,9 @@ stdenv.mkDerivation rec {
;
#TODO: colord?
## (2019-06-12) Demos seem to install fine now. Keeping this around in case it fails again.
## (2014-03-27) demos fail to install, no idea where's the problem
#preConfigure = "sed '/^SRC_SUBDIRS /s/demos//' -i Makefile.in";
configureFlags = optional stdenv . isDarwin [
" - - d i s a b l e - d e b u g "
" - - d i s a b l e - d e p e n d e n c y - t r a c k i n g "
" - - d i s a b l e - g l i b t e s t "
] ++ optional ( stdenv . isDarwin && ! x11Support )
" - - e n a b l e - q u a r t z - b a c k e n d "
++ optional x11Support [
" - - e n a b l e - x 1 1 - b a c k e n d "
] ++ optional waylandSupport [
" - - e n a b l e - w a y l a n d - b a c k e n d "
] ;
doCheck = false ; # needs X11
postInstall = optionalString ( ! stdenv . isDarwin ) ''
substituteInPlace " $ o u t / l i b / g t k - 3 . 0 / 3 . 0 . 0 / p r i n t b a c k e n d s / l i b p r i n t b a c k e n d - c u p s . l a " \
- - replace ' - L $ { gmp . dev } /lib ' ' - L $ { gmp . out } /lib '
# The updater is needed for nixos env and it's tiny.
moveToOutput bin/gtk-update-icon-cache " $ o u t "
# Launcher