Browse Source

eclipses: add dependencies as build inputs

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.
nixos-19.03
Robert Helgesson 5 years ago
parent
commit
5228bc9f2e
No known key found for this signature in database
GPG Key ID: C3DB11069E65DC86
  1. 10
      pkgs/applications/editors/eclipse/build-eclipse.nix
  2. 5
      pkgs/applications/editors/eclipse/default.nix

10
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 }:
@ -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.
@ -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.

5
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
@ -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

Loading…
Cancel
Save