From b0e4127a70630096d4878d7919143bc888baf8e2 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Fri, 8 Feb 2019 12:06:16 -0500 Subject: [PATCH] cron: fix error when running crontab as sudo (issue #54827) (cherry picked from commit c8547081cb61d6078f0681be98a5331717a115f3) Fixes https://github.com/NixOS/nixpkgs/issues/54827. --- pkgs/tools/system/cron/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/system/cron/default.nix b/pkgs/tools/system/cron/default.nix index 374f0ac19d89f9..aa047ca4a681db 100644 --- a/pkgs/tools/system/cron/default.nix +++ b/pkgs/tools/system/cron/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, sendmailPath ? "/usr/sbin/sendmail"}: +{stdenv, fetchurl, vim, sendmailPath ? "/usr/sbin/sendmail"}: stdenv.mkDerivation { name = "cron-4.1"; @@ -25,6 +25,9 @@ stdenv.mkDerivation { #undef _PATH_SENDMAIL #define _PATH_SENDMAIL "${sendmailPath}" + #undef _PATH_VI + #define _PATH_VI "${vim}/bin/vim" + #undef _PATH_DEFPATH #define _PATH_DEFPATH "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin" __EOT__