diff options
Diffstat (limited to 'src/nix-env')
-rw-r--r-- | src/nix-env/main.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index cf4ac8fc4a7b..213082bdc7df 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); } |