openjdk: Ugly hack to fix nix-env installation

Nix-env always wants to install all outputs of a derivation, but this
failed for openjdk/openjre because openjdk has some symlinks (such as
bin/java) to openjre.  Also, it prevents installing the openjre
without the openjdk.  So as a workaround, mess with the "outputs"
attribute to fool nix-env.

Also, give openjre a separate name and description.

Fixes #1535.
This commit is contained in:
Eelco Dolstra
2014-01-20 14:54:50 +01:00
parent 9068ba2bb4
commit 8890492872
2 changed files with 9 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ rec {
addMetaAttrs {description = "Bla blah";} somePkg
*/
addMetaAttrs = newAttrs: drv:
drv // { meta = (if drv ? meta then drv.meta else {}) // newAttrs; };
drv // { meta = (drv.meta or {}) // newAttrs; };
/* Change the symbolic name of a package for presentation purposes
@@ -51,7 +51,7 @@ rec {
/* Apply lowPrio to an attrset with derivations
*/
lowPrioSet = set: mapDerivationAttrset lowPrio set;
lowPrioSet = set: mapDerivationAttrset lowPrio set;
/* Increase the nix-env priority of the package, i.e., this
@@ -63,5 +63,5 @@ rec {
/* Apply hiPrio to an attrset with derivations
*/
hiPrioSet = set: mapDerivationAttrset hiPrio set;
}