2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, cmake, recode, perl }:
|
2012-03-29 09:15:40 +02:00
|
|
|
|
2019-09-03 18:19:00 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "fortune-mod";
|
2020-11-13 11:26:25 +01:00
|
|
|
version = "3.4.1";
|
2018-07-19 06:28:14 +02:00
|
|
|
|
2020-10-29 12:22:09 +01:00
|
|
|
# We use fetchurl instead of fetchFromGitHub because the release pack has some
|
|
|
|
# special files.
|
2019-09-03 18:19:00 +02:00
|
|
|
src = fetchurl {
|
2020-10-29 12:22:09 +01:00
|
|
|
url = "https://github.com/shlomif/fortune-mod/releases/download/${pname}-${version}/${pname}-${version}.tar.xz";
|
2020-11-13 11:26:25 +01:00
|
|
|
sha256 = "02hjf432mq5qpbf1hywid7b356jys5n9brrrmm6z6r05jpzybbg3";
|
2019-09-03 18:19:00 +02:00
|
|
|
};
|
2019-02-05 14:07:27 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl ];
|
2018-07-19 06:28:14 +02:00
|
|
|
|
2012-06-13 01:41:05 +02:00
|
|
|
buildInputs = [ recode ];
|
2018-07-19 06:28:14 +02:00
|
|
|
|
2019-09-03 18:19:00 +02: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(
|
2020-10-29 12:22:09 +01:00
|
|
|
--
|
2019-09-03 18:19:00 +02:00
|
|
|
'') ];
|
2012-03-29 09:15:40 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2012-06-13 01:41:05 +02:00
|
|
|
description = "A program that displays a pseudorandom message from a database of quotations";
|
2018-08-16 21:55:12 +02:00
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
platforms = platforms.unix;
|
2020-10-29 12:22:09 +01:00
|
|
|
maintainers = with maintainers; [ vonfry ];
|
2012-03-29 09:15:40 +02:00
|
|
|
};
|
|
|
|
}
|