push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
diff -Naur cron-old/externs.h cron-new/externs.h
--- cron-old/externs.h 2024-08-23 09:04:25.525752797 -0300
+++ cron-new/externs.h 2024-08-23 10:12:05.304311078 -0300
@@ -121,3 +121,14 @@
#ifndef WCOREDUMP
# define WCOREDUMP(st) (((st) & 0200) != 0)
#endif
+
+/* Nixpkgs-specific patch begin */
+
+/*
+ Implicit saved UIDs do not work here due to way NixOS uses setuid wrappers
+ See https://github.com/NixOS/nixpkgs/issues/16518
+ */
+
+#undef HAVE_SAVED_UIDS
+
+/* Nixpkgs-specific patch end */
diff -Naur cron-old/pathnames.h cron-new/pathnames.h
--- cron-old/pathnames.h 2024-08-23 09:04:25.524752791 -0300
+++ cron-new/pathnames.h 2024-08-23 10:11:33.186749198 -0300
@@ -105,4 +105,23 @@
# define _PATH_DEVNULL "/dev/null"
#endif
+/* Nixpkgs-specific patch begin */
+
+/*
+ We want to ignore the $glibc/include/paths.h definition of sendmail path.
+ Further, set a usable default PATH
+ See https://github.com/NixOS/nixpkgs/issues/16518
+ */
+
+#undef _PATH_SENDMAIL
+#define _PATH_SENDMAIL "@sendmailPath@"
+
+#undef _PATH_VI
+#define _PATH_VI "@viPath@"
+
+#undef _PATH_DEFPATH
+#define _PATH_DEFPATH "@defPath@"
+
+/* Nixpkgs-specific patch end */
+
#endif /* _PATHNAMES_H_ */

View File

@@ -0,0 +1,70 @@
{
lib,
fetchurl,
stdenv,
replaceVars,
vim,
sendmailPath ? "/usr/sbin/sendmail",
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cron";
version = "4.1";
src = fetchurl {
url = "ftp://ftp.isc.org/isc/cron/cron_${finalAttrs.version}.shar";
hash = "sha256-xEWDd1b7mI8slduNxV15N9FLygzfopLegTIsolVuw5o=";
};
patches = [
(replaceVars ./0000-nixpkgs-specific.diff {
inherit sendmailPath;
viPath = lib.getExe' vim "vim";
defPath = lib.concatStringsSep ":" [
"/run/wrappers/bin"
"/nix/var/nix/profiles/default/bin"
"/run/current-system/sw/bin"
"/usr/bin"
"/bin"
];
})
];
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"DESTROOT=$(out)"
];
hardeningEnable = [ "pie" ];
unpackCmd = ''
mkdir cron
pushd cron
sh $curSrc
popd
'';
# do not set sticky bit in /nix/store
# further, do not strip during install since it breaks on cross-compilation
# and we will do this ourselves as needed
postPatch = ''
substituteInPlace Makefile \
--replace ' -o root' ' ' \
--replace 111 755 \
--replace 4755 0755 \
--replace ' -s cron' ' cron'
'';
preInstall = ''
mkdir -p $out/{{,s}bin,share/man/man{1,5,8}}
'';
meta = {
homepage = "https://ftp.isc.org/isc/cron/";
description = "Daemon for running commands at specific times";
license = lib.licenses.bsd0;
mainProgram = "cron";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})