diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2019-09-24 11:24:13 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2019-09-26 17:42:49 +0200 |
commit | bad07dfac57c36dff1c7b3fd4020fea806d7be93 (patch) | |
tree | 2032f09b50cd998edf1db3f8122c8d2916a0ad14 /pkgs/os-specific/bsd | |
parent | 2d4352b1ae57a06670b451f1b4426beff9796628 (diff) | |
download | nixpkgs-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.nix | 4 |
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; |