summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-09-06 05:29:04 -0400
committerGitHub <noreply@github.com>2019-09-06 05:29:04 -0400
commit8b8b4abd55fbbfa05959250e03d6d1fa091afc6d (patch)
tree30195bcfad0d3df1f8a270ce3f7b105fead4654b /pkgs/tools/misc
parent3b39b03f05e3f5b1454608cc12df55111bf09b9f (diff)
parentf0485a852418c31911c83b0ec474ffbd3fa008ef (diff)
Merge pull request #67280 from dtzWill/update/fortune-2.10.0
fortune: 2.6.2 -> 2.10.0, use official tarball
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/fortune/default.nix51
1 files changed, 26 insertions, 25 deletions
diff --git a/pkgs/tools/misc/fortune/default.nix b/pkgs/tools/misc/fortune/default.nix
index 871f113a41dd..74c21d21fcc3 100644
--- a/pkgs/tools/misc/fortune/default.nix
+++ b/pkgs/tools/misc/fortune/default.nix
@@ -1,37 +1,38 @@
{ 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 {
+stdenv.mkDerivation rec {
pname = "fortune-mod";
- inherit version;
+ version = "2.10.0";
- src = srcs.fortune;
-
- sourceRoot = "fortune-mod-fortune-mod-${version}/fortune-mod";
+ src = fetchurl {
+ url = "https://www.shlomifish.org/open-source/projects/fortune-mod/arcs/fortune-mod-${version}.tar.xz";
+ sha256 = "07g50hij87jb7m40pkvgd47qfvv4s805lwiz79jbqcxzd7zdyax7";
+ };
nativeBuildInputs = [ cmake perl ];
buildInputs = [ recode ];
- preConfigure = ''
- cp ${srcs.shlomifCommon} cmake/Shlomif_Common.cmake
- '';
-
- postInstall = ''
- mv $out/games/fortune $out/bin/fortune
- rm -r $out/games
- '';
+ 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(
+ --
+ '') ];
meta = with stdenv.lib; {
description = "A program that displays a pseudorandom message from a database of quotations";