about summary refs log tree commit diff
path: root/pkgs/tools/misc/fortune/default.nix
diff options
context:
space:
mode:
authorf0x52 <f@0x52.eu>2022-05-01 18:58:25 +0200
committerGitHub <noreply@github.com>2022-05-01 16:58:25 +0000
commitf36eb34b6765fea160d2f83299cf694d3a05a2e7 (patch)
treeb73d96822c2b52ec20633bf6b55176c5b33f0ad3 /pkgs/tools/misc/fortune/default.nix
parent0e6265e8f2172e87c9406a9f04371333b1b19b19 (diff)
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.
Diffstat (limited to 'pkgs/tools/misc/fortune/default.nix')
-rw-r--r--pkgs/tools/misc/fortune/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix
index 988483fbd6a18..3e6ebb2f0d672 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";