2019-02-05 14:07:27 +01:00
|
|
|
{ stdenv, fetchurl, cmake, recode, perl }:
|
2012-03-29 09:15:40 +02:00
|
|
|
|
2019-02-05 14:07:27 +01: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 09:15:40 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-02-05 14:07:27 +01:00
|
|
|
name = "fortune-mod-${version}";
|
2018-07-19 06:28:14 +02:00
|
|
|
|
2019-02-05 14:07:27 +01:00
|
|
|
src = srcs.fortune;
|
|
|
|
|
|
|
|
sourceRoot = "fortune-mod-fortune-mod-${version}/fortune-mod";
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-03-29 09:15:40 +02:00
|
|
|
preConfigure = ''
|
2019-02-05 14:07:27 +01:00
|
|
|
cp ${srcs.shlomifCommon} cmake/Shlomif_Common.cmake
|
2015-01-29 19:14:49 +01:00
|
|
|
'';
|
2018-07-19 06:28:14 +02:00
|
|
|
|
2012-03-29 09:15:40 +02:00
|
|
|
postInstall = ''
|
2018-07-19 06:28:14 +02:00
|
|
|
mv $out/games/fortune $out/bin/fortune
|
2019-02-05 14:07:27 +01:00
|
|
|
rm -r $out/games
|
2012-03-29 09:15:40 +02:00
|
|
|
'';
|
|
|
|
|
2018-08-16 21:55:12 +02:00
|
|
|
meta = with stdenv.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;
|
2012-03-29 09:15:40 +02:00
|
|
|
};
|
|
|
|
}
|