1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/pkgs/tools/misc/fortune/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, cmake, recode, perl }:
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
stdenv.mkDerivation {
name = "fortune-mod-${version}";
src = srcs.fortune;
sourceRoot = "fortune-mod-fortune-mod-${version}/fortune-mod";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ recode ];
preConfigure = ''
cp ${srcs.shlomifCommon} cmake/Shlomif_Common.cmake
2015-01-29 18:14:49 +00:00
'';
postInstall = ''
mv $out/games/fortune $out/bin/fortune
rm -r $out/games
'';
2018-08-16 20:55:12 +01:00
meta = with stdenv.lib; {
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;
};
}