From f36eb34b6765fea160d2f83299cf694d3a05a2e7 Mon Sep 17 00:00:00 2001 From: f0x52 Date: Sun, 1 May 2022 18:58:25 +0200 Subject: [PATCH] fortune: remove offensive quotes from build (#171153) This builds the package with -DNO_OFFENSIVE=true, keeping out the off (offensive) directory from the resulting fortune files. It also removes the men-women quotes from the resulting db. Where various default fortune files include some questionable quotes, this removes the ones even the upstream finds offensive, and the men-women category. This is also in line with what Fedora does: https://src.fedoraproject.org/rpms/fortune-mod/blob/main/f/fortune-mod.spec#_64-74, and has done in some capacity for years. --- pkgs/tools/misc/fortune/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix index 988483fbd6a1..3e6ebb2f0d67 100644 --- a/pkgs/tools/misc/fortune/default.nix +++ b/pkgs/tools/misc/fortune/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DLOCALDIR=${placeholder "out"}/share/fortunes" + "-DNO_OFFENSIVE=true" ]; patches = [ (builtins.toFile "not-a-game.patch" '' @@ -36,6 +37,10 @@ stdenv.mkDerivation rec { -- '') ]; + postFixup = '' + rm -f $out/share/fortunes/men-women* + ''; + meta = with lib; { mainProgram = "fortune"; description = "A program that displays a pseudorandom message from a database of quotations";