diff options
author | Florian Klink <flokli@flokli.de> | 2022-10-03 13:09:29 +0200 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2022-10-03 13:09:29 +0200 |
commit | 20c2a3a9d596a30bff1b28247e40e668329d32a9 (patch) | |
tree | 6c375947207d223b29281647dbff3725178297f4 /pkgs/os-specific/linux/systemd/default.nix | |
parent | ad745e2e6847a5bf8fe81ca9ac4dd1b5eadba5ef (diff) | |
download | nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.tar nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.tar.gz nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.tar.bz2 nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.tar.lz nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.tar.xz nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.tar.zst nixpkgs-20c2a3a9d596a30bff1b28247e40e668329d32a9.zip |
systemd: nixpkgs-fmt
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 5b417369a55..b242fb37002 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -571,21 +571,22 @@ stdenv.mkDerivation { ]; # { replacement, search, where } -> List[str] - mkSubstitute = { replacement, search, where, ignore ? [] }: + mkSubstitute = { replacement, search, where, ignore ? [ ] }: map (path: "substituteInPlace ${path} --replace '${search}' \"${replacement}\"") where; - mkEnsureSubstituted = { replacement, search, where, ignore ? [] }: - let - ignore' = lib.concatStringsSep "|" (ignore ++ ["^test" "NEWS"]); - in '' - set +e - search=$(grep '${search}' -r | grep -v "${replacement}" | grep -Ev "${ignore'}") - set -e - if [[ -n "$search" ]]; then - echo "Not all references to '${search}' have been replaced. Found the following matches:" - echo "$search" - exit 1 - fi - ''; + mkEnsureSubstituted = { replacement, search, where, ignore ? [ ] }: + let + ignore' = lib.concatStringsSep "|" (ignore ++ [ "^test" "NEWS" ]); + in + '' + set +e + search=$(grep '${search}' -r | grep -v "${replacement}" | grep -Ev "${ignore'}") + set -e + if [[ -n "$search" ]]; then + echo "Not all references to '${search}' have been replaced. Found the following matches:" + echo "$search" + exit 1 + fi + ''; in '' mesonFlagsArray+=(-Dntp-servers="0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org") |