diff --git a/src/buildenv/buildenv.cc b/src/buildenv/buildenv.cc
index 885c5e16903997dc20be72a632c282bc8cccc3c8..f05aa7bf2fbb6fa605212a603688f4873d4a9332 100644
--- a/src/buildenv/buildenv.cc
+++ b/src/buildenv/buildenv.cc
@@ -74,10 +74,11 @@ static void createLinks(const Path & srcDir, const Path & dstDir, int priority)
                     auto prevPriority = priorities[dstFile];
                     if (prevPriority == priority)
                         throw Error(format(
-                                "collision between '%1%' and '%2%'; "
-                                "use 'nix-env --set-flag priority NUMBER PKGNAME' "
+                                "Packages '%1%' and '%2%' have the same priority '%3%'"
+                                "use 'nix-env --set-flag priority NUMBER INSTALLED_PKGNAME' "
                                 "to change the priority of one of the conflicting packages"
-                                ) % srcFile % target);
+                                " ('0' being the highest priority)"
+                                ) % srcFile % target % priority);
                     if (prevPriority < priority)
                         continue;
                     if (unlink(dstFile.c_str()) == -1)