diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix index 3e6ebb2f0d6..9cab0bc2237 100644 --- a/pkgs/tools/misc/fortune/default.nix +++ b/pkgs/tools/misc/fortune/default.nix @@ -1,14 +1,14 @@ -{ lib, stdenv, fetchurl, cmake, recode, perl }: +{ lib, stdenv, fetchurl, cmake, recode, perl, withOffensive ? false }: stdenv.mkDerivation rec { pname = "fortune-mod"; - version = "3.12.0"; + version = "3.14.0"; # We use fetchurl instead of fetchFromGitHub because the release pack has some # special files. src = fetchurl { url = "https://github.com/shlomif/fortune-mod/releases/download/${pname}-${version}/${pname}-${version}.tar.xz"; - sha256 = "sha256-fVrtfLmZiVDTSeuoOltX/vunGSizSw+ZhQhBn9t0C3E="; + sha256 = "sha256-jjBxCfjLjnhdKeMgJwEPytCVKQ4R4wHeF8/3Z/F6UgQ="; }; nativeBuildInputs = [ cmake perl ]; @@ -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* '';