Merge pull request #279001 from katexochen/cronutils/init

cronutils: init at 1.10

authored by Pol Dellaiera and committed by GitHub f2859b6f 6e601c77

+54
+54
pkgs/by-name/cr/cronutils/package.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchpatch 5 + }: 6 + 7 + stdenv.mkDerivation (finalAttrs: { 8 + pname = "cronutils"; 9 + version = "1.10"; 10 + 11 + outputs = [ "out" "man" ]; 12 + 13 + src = fetchFromGitHub { 14 + owner = "google"; 15 + repo = "cronutils"; 16 + rev = "version/${finalAttrs.version}"; 17 + hash = "sha256-XJksfX4jqE32l4HipvO26iv9W4c0Iss6DenlEatdL1k="; 18 + }; 19 + 20 + patches = [ 21 + # Add missing libgen.h include. Backported from https://github.com/google/cronutils/pull/11. 22 + (fetchpatch { 23 + url = "https://github.com/google/cronutils/commit/5d742fc154fc1adcfebc646dca0c45b0f0060844.patch"; 24 + hash = "sha256-o1ylZ+fKL1fQYSKSOkujDsh4CUQya0wJ47uGNNC6mVQ="; 25 + }) 26 + # Fix function declaration without a prototype. Backported from https://github.com/google/cronutils/pull/11. 27 + (fetchpatch { 28 + url = "https://github.com/google/cronutils/commit/c39df37c6c280e3f73ea57cfa598b8447e5a58fe.patch"; 29 + hash = "sha256-og/xEWn0M7+mkbLGY14nkYpV3ckr7eYrb0X22Zxmq8w="; 30 + }) 31 + # Remove `LDLIBS+=-lrt` from Makefile. Backported from https://github.com/google/cronutils/pull/11. 32 + (fetchpatch { 33 + url = "https://github.com/google/cronutils/commit/de72c648d12d102b79d4e3bb57830f2d79f5702a.patch"; 34 + hash = "sha256-njftI3RbrjRtXpXKFHNE9HroIZr5tqVnEK77lu4+/sI="; 35 + }) 36 + ]; 37 + 38 + makeFlags = [ "prefix=$(out)" ]; 39 + 40 + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin (toString [ 41 + "-D_DARWIN_C_SOURCE" 42 + # runstat.c:81:81: error: format string is not a string literal 43 + "-Wno-format-nonliteral" 44 + ]); 45 + 46 + meta = with lib; { 47 + changelog = "https://github.com/google/cronutils/releases/tag/version%2F${finalAttrs.version}"; 48 + description = "Utilities to assist running periodic batch processing jobs"; 49 + homepage = "https://github.com/google/cronutils"; 50 + license = licenses.asl20; 51 + maintainers = with maintainers; [ katexochen ]; 52 + platforms = platforms.all; 53 + }; 54 + })