aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nix-env/main.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index cf4ac8fc4..213082bdc 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -465,9 +465,17 @@ static void opUninstall(Globals & globals,
}
+static bool cmpChars(char a, char b)
+{
+ return toupper(a) < toupper(b);
+}
+
+
static bool cmpDrvByName(const DrvInfo & a, const DrvInfo & b)
{
- return a.name < b.name;
+ return lexicographical_compare(
+ a.name.begin(), a.name.end(),
+ b.name.begin(), b.name.end(), cmpChars);
}