Commit 7d7ac5d1 authored by Matt McHenry's avatar Matt McHenry
Browse files

eclipses: standardize name/version attributes

* set pname rather than name in the generateEclipse function

* use the standard 'version' attribute name rather than the ad-hoc
  'productVersion' attribute when calling buildEclipseUnversioned

* pass 'pname' and 'version' through to mkDerivation, and let it
  derive 'name', per standard convention

* update generation of the '-configuration' argument to use 'version'

fixes:

    The derivation has no version attribute, so do not know how to figure out the version while doing an updateScript update

... during automated update process introduced in 5bb31f95
parent 9c24350f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -21,15 +21,15 @@
}:

{
  name,
  pname,
  src ? builtins.getAttr stdenv.hostPlatform.system sources,
  sources ? null,
  description,
  productVersion,
  version,
}:

stdenv.mkDerivation rec {
  inherit name src;
  inherit pname version src;

  desktopItem = makeDesktopItem {
    name = "Eclipse";
@@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
      } \
      --prefix GIO_EXTRA_MODULES : "${glib-networking}/lib/gio/modules" \
      --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
      --add-flags "-configuration \$HOME/.eclipse/''${productId}_${productVersion}/configuration"
      --add-flags "-configuration \$HOME/.eclipse/''${productId}_${version}/configuration"

    # Create desktop item.
    mkdir -p $out/share/applications
+2 −4
Original line number Diff line number Diff line
@@ -70,9 +70,7 @@ let
  };
  buildEclipse =
    eclipseData:
    buildEclipseUnversioned (
      eclipseData // { productVersion = "${platform_major}.${platform_minor}"; }
    );
    buildEclipseUnversioned (eclipseData // { version = "${platform_major}.${platform_minor}"; });

  generateEclipse =
    id:
@@ -85,7 +83,7 @@ let
      {
        name = "eclipse-${lib.strings.toLower id}";
        value = buildEclipse {
          name = "eclipse-${lib.strings.toLower id}-${platform_major}.${platform_minor}";
          pname = "eclipse-${lib.strings.toLower id}";
          inherit description;
          src = fetchurl {
            url =