2019-02-05 13:07:27 +00:00
|
|
|
{ stdenv, fetchurl, cmake, recode, perl }:
|
2012-03-29 08:15:40 +01:00
|
|
|
|
2019-09-03 17:19:00 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "fortune-mod";
|
2019-09-03 17:19:00 +01:00
|
|
|
version = "2.10.0";
|
2018-07-19 05:28:14 +01:00
|
|
|
|
2019-09-03 17:19:00 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.shlomifish.org/open-source/projects/fortune-mod/arcs/fortune-mod-${version}.tar.xz";
|
|
|
|
sha256 = "07g50hij87jb7m40pkvgd47qfvv4s805lwiz79jbqcxzd7zdyax7";
|
|
|
|
};
|
2019-02-05 13:07:27 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl ];
|
2018-07-19 05:28:14 +01:00
|
|
|
|
2012-06-13 00:41:05 +01:00
|
|
|
buildInputs = [ recode ];
|
2018-07-19 05:28:14 +01:00
|
|
|
|
2019-09-03 17:19:00 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DLOCALDIR=${placeholder "out"}/share/fortunes"
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [ (builtins.toFile "not-a-game.patch" ''
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 865e855..5a59370 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -154,7 +154,7 @@ ENDMACRO()
|
|
|
|
my_exe(
|
|
|
|
"fortune"
|
|
|
|
"fortune/fortune.c"
|
|
|
|
- "games"
|
|
|
|
+ "bin"
|
|
|
|
)
|
|
|
|
|
|
|
|
my_exe(
|
|
|
|
--
|
|
|
|
'') ];
|
2012-03-29 08:15:40 +01:00
|
|
|
|
2018-08-16 20:55:12 +01:00
|
|
|
meta = with stdenv.lib; {
|
2012-06-13 00:41:05 +01:00
|
|
|
description = "A program that displays a pseudorandom message from a database of quotations";
|
2018-08-16 20:55:12 +01:00
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
platforms = platforms.unix;
|
2012-03-29 08:15:40 +01:00
|
|
|
};
|
|
|
|
}
|