From 346c1db2ac336e15f2c0019292963a9c5ba37f58 Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Sun, 25 Dec 2016 01:22:31 +0100 Subject: [PATCH 1/2] xournal: Allow to build it on darwin with X11 backend --- pkgs/applications/graphics/xournal/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/graphics/xournal/default.nix b/pkgs/applications/graphics/xournal/default.nix index 669fc5a28a7..97b418f08c1 100644 --- a/pkgs/applications/graphics/xournal/default.nix +++ b/pkgs/applications/graphics/xournal/default.nix @@ -13,8 +13,10 @@ stdenv.mkDerivation rec { buildInputs = [ ghostscript atk gtk2 glib fontconfig freetype - libgnomecanvas libgnomeprint libgnomeprintui + libgnomecanvas pango libX11 xproto zlib poppler + ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ + libgnomeprint libgnomeprintui ]; nativeBuildInputs = [ autoconf automake libtool pkgconfig ]; @@ -47,11 +49,11 @@ stdenv.mkDerivation rec { cp $out/share/xournal/pixmaps/xournal.png $out/share/icons ''; - meta = { + meta = with stdenv.lib; { homepage = http://xournal.sourceforge.net/; description = "Note-taking application (supposes stylus)"; - maintainers = [ stdenv.lib.maintainers.guibert ]; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.linux; + maintainers = [ maintainers.guibert ]; + license = licenses.gpl2; + platforms = with platforms; linux ++ darwin; }; } From febab15b01fc2ed68e688e3819941a2c62091d8a Mon Sep 17 00:00:00 2001 From: Johannes Bornhold Date: Tue, 27 Dec 2016 08:45:37 +0100 Subject: [PATCH 2/2] gtk2: Enable xinput for Darwin --- pkgs/development/libraries/gtk+/2.x.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gtk+/2.x.nix b/pkgs/development/libraries/gtk+/2.x.nix index 91407e556c0..ba12b4eea93 100644 --- a/pkgs/development/libraries/gtk+/2.x.nix +++ b/pkgs/development/libraries/gtk+/2.x.nix @@ -38,9 +38,13 @@ stdenv.mkDerivation rec { ++ optional xineramaSupport libXinerama ++ optionals cupsSupport [ cups ]; - configureFlags = if stdenv.isDarwin - then "--disable-glibtest --disable-introspection --disable-visibility" - else "--with-xinput=yes"; + configureFlags = [ + "--with-xinput=yes" + ] ++ stdenv.lib.optionals stdenv.isDarwin [ + "--disable-glibtest" + "--disable-introspection" + "--disable-visibility" + ]; postInstall = '' moveToOutput share/gtk-2.0/demo "$devdoc"