2019-02-05 13:07:27 +00:00
|
|
|
{ stdenv, fetchurl, cmake, recode, perl }:
|
2012-03-29 07:15:40 +00:00
|
|
|
|
2019-02-05 13:07:27 +00:00
|
|
|
let srcs = {
|
|
|
|
fortune = fetchurl {
|
|
|
|
url = "https://github.com/shlomif/fortune-mod/archive/fortune-mod-${version}.tar.gz";
|
|
|
|
sha256 = "89223bb649ea62b030527f181539182d6a17a1a43b0cc499a52732b839f7b691";
|
|
|
|
};
|
|
|
|
shlomifCommon = fetchurl {
|
|
|
|
url = https://bitbucket.org/shlomif/shlomif-cmake-modules/raw/default/shlomif-cmake-modules/Shlomif_Common.cmake;
|
|
|
|
sha256 = "62f188a9f1b7ab0e757eb0bc6540d9c0026d75edc7acc1c3cdf7438871d0a94f";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
version = "2.6.2";
|
|
|
|
in
|
2012-03-29 07:15:40 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-02-05 13:07:27 +00:00
|
|
|
name = "fortune-mod-${version}";
|
2018-07-19 04:28:14 +00:00
|
|
|
|
2019-02-05 13:07:27 +00:00
|
|
|
src = srcs.fortune;
|
|
|
|
|
|
|
|
sourceRoot = "fortune-mod-fortune-mod-${version}/fortune-mod";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake perl ];
|
2018-07-19 04:28:14 +00:00
|
|
|
|
2012-06-12 23:41:05 +00:00
|
|
|
buildInputs = [ recode ];
|
2018-07-19 04:28:14 +00:00
|
|
|
|
2012-03-29 07:15:40 +00:00
|
|
|
preConfigure = ''
|
2019-02-05 13:07:27 +00:00
|
|
|
cp ${srcs.shlomifCommon} cmake/Shlomif_Common.cmake
|
2015-01-29 18:14:49 +00:00
|
|
|
'';
|
2018-07-19 04:28:14 +00:00
|
|
|
|
2012-03-29 07:15:40 +00:00
|
|
|
postInstall = ''
|
2018-07-19 04:28:14 +00:00
|
|
|
mv $out/games/fortune $out/bin/fortune
|
2019-02-05 13:07:27 +00:00
|
|
|
rm -r $out/games
|
2012-03-29 07:15:40 +00:00
|
|
|
'';
|
|
|
|
|
2018-08-16 19:55:12 +00:00
|
|
|
meta = with stdenv.lib; {
|
2012-06-12 23:41:05 +00:00
|
|
|
description = "A program that displays a pseudorandom message from a database of quotations";
|
2018-08-16 19:55:12 +00:00
|
|
|
license = licenses.bsdOriginal;
|
|
|
|
platforms = platforms.unix;
|
2012-03-29 07:15:40 +00:00
|
|
|
};
|
|
|
|
}
|