Skip to content

Commit

Permalink
eclipses: add dependencies as build inputs
Browse files Browse the repository at this point in the history
Having `glib` in the build inputs will allow its build hook to
trigger. Also adds `gsettings_desktop_schemas` as a dependency since
Eclipse appears to need the schemas under certain circumstances.

(cherry picked from commit 5228bc9)
  • Loading branch information
rycee committed Mar 14, 2017
1 parent 3c61bc1 commit 3905792
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions pkgs/applications/editors/eclipse/build-eclipse.nix
@@ -1,4 +1,6 @@
{ stdenv, makeDesktopItem, freetype, fontconfig, libX11, libXrender, zlib, jdk, glib, gtk2, libXtst, webkitgtk2, makeWrapper, ... }:
{ stdenv, makeDesktopItem, freetype, fontconfig, libX11, libXrender
, zlib, jdk, glib, gtk2, libXtst, gsettings_desktop_schemas, webkitgtk2
, makeWrapper, ... }:

{ name, src ? builtins.getAttr stdenv.system sources, sources ? null, description }:

Expand All @@ -15,7 +17,10 @@ stdenv.mkDerivation rec {
categories = "Application;Development;";
};

buildInputs = [ makeWrapper ];
buildInputs = [
fontconfig freetype glib gsettings_desktop_schemas gtk2 jdk libX11
libXrender libXtst makeWrapper zlib
] ++ stdenv.lib.optional (webkitgtk2 != null) webkitgtk2;

buildCommand = ''
# Unpack tarball.
Expand All @@ -37,6 +42,7 @@ stdenv.mkDerivation rec {
makeWrapper $out/eclipse/eclipse $out/bin/eclipse \
--prefix PATH : ${jdk}/bin \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath ([ glib gtk2 libXtst ] ++ stdenv.lib.optional (webkitgtk2 != null) webkitgtk2)} \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--add-flags "-configuration \$HOME/.eclipse/''${productId}_$productVersion/configuration"
# Create desktop item.
Expand Down
5 changes: 3 additions & 2 deletions pkgs/applications/editors/eclipse/default.nix
@@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, makeDesktopItem, makeWrapper
, freetype, fontconfig, libX11, libXext, libXrender, zlib
, glib, gtk2, libXtst, jdk
, glib, gtk2, libXtst, jdk, gsettings_desktop_schemas
, webkitgtk2 ? null # for internal web browser
, buildEnv, writeText, runCommand
, callPackage
Expand All @@ -12,7 +12,8 @@ rec {

buildEclipse = import ./build-eclipse.nix {
inherit stdenv makeDesktopItem freetype fontconfig libX11 libXrender zlib
jdk glib gtk2 libXtst webkitgtk2 makeWrapper;
jdk glib gtk2 libXtst gsettings_desktop_schemas webkitgtk2
makeWrapper;
};

### Eclipse CPP
Expand Down

0 comments on commit 3905792

Please sign in to comment.