about summary refs log tree commit diff
path: root/src/nix-env
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-12T11·49+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-12T11·49+0100
commitb3e8d72770b4100843c60b35633e529e6e69d543 (patch)
treef50070c3c31dd862b837bb514a9e0b10e68216a1 /src/nix-env
parentae4a3cfa030438ca05ad3bf61fa301dee6c1dbb5 (diff)
parent5cdcaf5e8edd6679f667502eec421ac4e725d4ef (diff)
Merge pull request #762 from ctheune/ctheune-floats
Implement floats
Diffstat (limited to 'src/nix-env')
-rw-r--r--src/nix-env/nix-env.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc
index 12e19d4af797..a9d1ed024dd3 100644
--- a/src/nix-env/nix-env.cc
+++ b/src/nix-env/nix-env.cc
@@ -1127,6 +1127,10 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
                                     attrs2["type"] = "int";
                                     attrs2["value"] = (format("%1%") % v->integer).str();
                                     xml.writeEmptyElement("meta", attrs2);
+                                } else if (v->type == tFloat) {
+                                    attrs2["type"] = "float";
+                                    attrs2["value"] = (format("%1%") % v->fpoint).str();
+                                    xml.writeEmptyElement("meta", attrs2);
                                 } else if (v->type == tBool) {
                                     attrs2["type"] = "bool";
                                     attrs2["value"] = v->boolean ? "true" : "false";