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 5bb31f9518
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user