|
|
@ -1,14 +1,14 @@ |
|
|
|
{ lib, stdenv, fetchurl, cmake, recode, perl }: |
|
|
|
{ lib, stdenv, fetchurl, cmake, recode, perl, withOffensive ? false }: |
|
|
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
stdenv.mkDerivation rec { |
|
|
|
pname = "fortune-mod"; |
|
|
|
pname = "fortune-mod"; |
|
|
|
version = "3.12.0"; |
|
|
|
version = "3.14.0"; |
|
|
|
|
|
|
|
|
|
|
|
# We use fetchurl instead of fetchFromGitHub because the release pack has some |
|
|
|
# We use fetchurl instead of fetchFromGitHub because the release pack has some |
|
|
|
# special files. |
|
|
|
# special files. |
|
|
|
src = fetchurl { |
|
|
|
src = fetchurl { |
|
|
|
url = "https://github.com/shlomif/fortune-mod/releases/download/${pname}-${version}/${pname}-${version}.tar.xz"; |
|
|
|
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 ]; |
|
|
|
nativeBuildInputs = [ cmake perl ]; |
|
|
@ -17,8 +17,7 @@ stdenv.mkDerivation rec { |
|
|
|
|
|
|
|
|
|
|
|
cmakeFlags = [ |
|
|
|
cmakeFlags = [ |
|
|
|
"-DLOCALDIR=${placeholder "out"}/share/fortunes" |
|
|
|
"-DLOCALDIR=${placeholder "out"}/share/fortunes" |
|
|
|
"-DNO_OFFENSIVE=true" |
|
|
|
] ++ lib.optional (!withOffensive) "-DNO_OFFENSIVE=true"; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
patches = [ (builtins.toFile "not-a-game.patch" '' |
|
|
|
patches = [ (builtins.toFile "not-a-game.patch" '' |
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt |
|
|
|
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* |
|
|
|
rm -f $out/share/fortunes/men-women* |
|
|
|
''; |
|
|
|
''; |
|
|
|
|
|
|
|
|
|
|
|