summary refs log tree commit diff
path: root/pkgs/os-specific/bsd
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2019-09-24 11:24:13 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2019-09-26 17:42:49 +0200
commitbad07dfac57c36dff1c7b3fd4020fea806d7be93 (patch)
tree2032f09b50cd998edf1db3f8122c8d2916a0ad14 /pkgs/os-specific/bsd
parent2d4352b1ae57a06670b451f1b4426beff9796628 (diff)
downloadnixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.tar
nixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.tar.gz
nixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.tar.bz2
nixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.tar.lz
nixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.tar.xz
nixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.tar.zst
nixpkgs-bad07dfac57c36dff1c7b3fd4020fea806d7be93.zip
tree-wide: replace uses of splitString "." with lib.versions
Quoting from the splitString docstring:

   NOTE: this function is not performant and should never be used.

This replaces trivial uses of splitString for splitting version
strings with the (potentially builtin) splitVersion.
Diffstat (limited to 'pkgs/os-specific/bsd')
-rw-r--r--pkgs/os-specific/bsd/netbsd/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix
index 7370901f319..f724fd33939 100644
--- a/pkgs/os-specific/bsd/netbsd/default.nix
+++ b/pkgs/os-specific/bsd/netbsd/default.nix
@@ -68,9 +68,9 @@ let
   } // lib.optionalAttrs stdenv'.isDarwin {
     MKRELRO = "no";
   } // lib.optionalAttrs (stdenv'.cc.isClang or false) {
-    HAVE_LLVM = lib.head (lib.splitString "." (lib.getVersion stdenv'.cc.cc));
+    HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc);
   } // lib.optionalAttrs (stdenv'.cc.isGNU or false) {
-    HAVE_GCC = lib.head (lib.splitString "." (lib.getVersion stdenv'.cc.cc));
+    HAVE_GCC = lib.versions.major (lib.getVersion stdenv'.cc.cc);
   } // lib.optionalAttrs (attrs.headersOnly or false) {
     installPhase = "includesPhase";
     dontBuild = true;