summaryrefslogtreecommitdiffstats
path: root/lib/meta.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-20 14:54:50 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-20 14:58:09 +0100
commit88904928729ea72e879a5dddfbdddfdb0e61f729 (patch)
tree196b5fd6484397e67379d486a797d3588e335432 /lib/meta.nix
parent9068ba2bb4183ec5fc250a88fea74f464928b276 (diff)
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.
Diffstat (limited to 'lib/meta.nix')
-rw-r--r--lib/meta.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/meta.nix b/lib/meta.nix
index 74e9cfb411c4..1af314733486 100644
--- a/lib/meta.nix
+++ b/lib/meta.nix
@@ -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;
-
+
}