diff options
author | Vonfry <mail@vonfry.name> | 2022-05-08 09:44:04 +0800 |
---|---|---|
committer | Vonfry <mail@vonfry.name> | 2022-05-09 09:02:30 +0800 |
commit | bf09f6c83afefd3c2dae00eeec0802644ceb7456 (patch) | |
tree | 041b15f0f0d7f191984f77ef5fcc30148b29fdf7 /pkgs/tools/misc/fortune/default.nix | |
parent | d707e510df39cdd8fe1d3e244371a3a9f23051d2 (diff) |
fortune: add an option to let user use offensive
Diffstat (limited to 'pkgs/tools/misc/fortune/default.nix')
-rw-r--r-- | pkgs/tools/misc/fortune/default.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix index 3e6ebb2f0d672..b4778cd1acb9d 100644 --- a/pkgs/tools/misc/fortune/default.nix +++ b/pkgs/tools/misc/fortune/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, cmake, recode, perl }: +{ lib, stdenv, fetchurl, cmake, recode, perl, withOffensive ? false }: stdenv.mkDerivation rec { pname = "fortune-mod"; @@ -17,8 +17,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DLOCALDIR=${placeholder "out"}/share/fortunes" - "-DNO_OFFENSIVE=true" - ]; + ] ++ lib.optional (!withOffensive) "-DNO_OFFENSIVE=true"; patches = [ (builtins.toFile "not-a-game.patch" '' diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -37,7 +36,7 @@ stdenv.mkDerivation rec { -- '') ]; - postFixup = '' + postFixup = lib.optionalString (!withOffensive) '' rm -f $out/share/fortunes/men-women* ''; |