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.
This commit is contained in:
f0x52 2022-05-01 18:58:25 +02:00 committed by GitHub
parent 0e6265e8f2
commit f36eb34b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";