about summary refs log tree commit diff
path: root/pkgs/lib/strings.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/strings.nix')
-rw-r--r--pkgs/lib/strings.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix
index ed668e2b9270..024a9ac7d7a2 100644
--- a/pkgs/lib/strings.nix
+++ b/pkgs/lib/strings.nix
@@ -163,6 +163,10 @@ rec {
   versionOlder = v1: v2: builtins.compareVersions v2 v1 == 1;
 
 
+  # Return true iff string v1 denotes a version equal to or newer than v2.
+  versionAtLeast = v1: v2: !versionOlder v1 v2;
+
+
   # Get the version of the specified derivation, as specified in its
   # ‘name’ attribute.
   getVersion = drv: (builtins.parseDrvName drv.name).version;