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:
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user