summary refs log tree commit diff
path: root/pkgs/games/freecell-solver/default.nix
blob: 3ba383c74273e66b1bee4728d2423664b0020ea4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ stdenv, fetchurl, pkgconfig, cmake
, perl, gmp, libtap, gperf
, perlPackages, python3 }:

with stdenv.lib;
stdenv.mkDerivation rec{

  pname = "freecell-solver";
  version = "4.18.0";

  src = fetchurl {
    url = "https://fc-solve.shlomifish.org/downloads/fc-solve/${pname}-${version}.tar.xz";
    sha256 = "1cmaib69pijmcpvgjvrdry8j4xys8l906l80b8z21vvyhdwrfdnn";
  };

  nativeBuildInputs = [
    cmake perl pkgconfig
  ] ++ (with perlPackages; TaskFreecellSolverTesting.buildInputs ++ [
    GamesSolitaireVerify StringShellQuote TaskFreecellSolverTesting TemplateToolkit
  ]);

  buildInputs = [
    gmp libtap gperf
    python3 python3.pkgs.random2
  ];

  # "ninja t/CMakeFiles/delta-states-test.t.exe.dir/__/delta_states.c.o" fails
  # to depend on the generated "is_king.h".
  enableParallelBuilding = false;

  meta = {
    description = "A FreeCell automatic solver";
    longDescription = ''
      FreeCell Solver is a program that automatically solves layouts
      of Freecell and similar variants of Card Solitaire such as Eight
      Off, Forecell, and Seahaven Towers, as well as Simple Simon
      boards.
    '';
    homepage = https://fc-solve.shlomifish.org/;
    license = licenses.mit;
    maintainers = [ maintainers.AndersonTorres ];
    platforms = platforms.unix;
  };
}