summary refs log tree commit diff
path: root/nixos/modules/services/web-servers/apache-httpd/default.nix
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 /nixos/modules/services/web-servers/apache-httpd/default.nix
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 'nixos/modules/services/web-servers/apache-httpd/default.nix')
-rw-r--r--nixos/modules/services/web-servers/apache-httpd/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index 098160ee369..b0374d949fc 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -12,7 +12,7 @@ let
 
   php = mainCfg.phpPackage.override { apacheHttpd = httpd.dev; /* otherwise it only gets .out */ };
 
-  phpMajorVersion = head (splitString "." php.version);
+  phpMajorVersion = lib.versions.major (lib.getVersion php);
 
   mod_perl = pkgs.apacheHttpdPackages.mod_perl.override { apacheHttpd = httpd; };