aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/command.hh3
-rw-r--r--src/nix/eval.cc2
-rw-r--r--src/nix/main.cc1
-rw-r--r--src/nix/progress-bar.cc2
4 files changed, 5 insertions, 3 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index ef29381cf..13f3a0dc9 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -17,7 +17,7 @@ namespace flake {
enum HandleLockFile : unsigned int;
}
-/* A command that require a Nix store. */
+/* A command that requires a Nix store. */
struct StoreCommand : virtual Command
{
StoreCommand();
@@ -91,6 +91,7 @@ private:
std::vector<std::string> _installables;
};
+/* A command that operates on exactly one "installable" */
struct InstallableCommand : virtual Args, SourceExprCommand
{
std::shared_ptr<Installable> installable;
diff --git a/src/nix/eval.cc b/src/nix/eval.cc
index 524bac304..276fdf003 100644
--- a/src/nix/eval.cc
+++ b/src/nix/eval.cc
@@ -36,7 +36,7 @@ struct CmdEval : MixJSON, InstallableCommand
},
Example{
"To get the current version of Nixpkgs:",
- "nix eval --raw nixpkgs.lib.nixpkgsVersion"
+ "nix eval --raw nixpkgs.lib.version"
},
Example{
"To print the store path of the Hello package:",
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 8cdeed8f5..5c0faf879 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -15,6 +15,7 @@
#include <sys/socket.h>
#include <ifaddrs.h>
#include <netdb.h>
+#include <netinet/in.h>
extern std::string chrootHelperName;
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc
index 5c05d6b22..661966733 100644
--- a/src/nix/progress-bar.cc
+++ b/src/nix/progress-bar.cc
@@ -341,7 +341,7 @@ public:
}
auto width = getWindowSize().second;
- if (width <= 0) std::numeric_limits<decltype(width)>::max();
+ if (width <= 0) width = std::numeric_limits<decltype(width)>::max();
writeToStderr("\r" + filterANSIEscapes(line, false, width) + "\e[K");
}