about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/solicurses/default.nix
blob: 3b0a60cb1e817201f071ef180b25521f4717e35c (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
{ stdenv
, lib
, fetchFromGitHub
, ncurses
}:

stdenv.mkDerivation {
  pname = "solicurses";
  version = "unstable-2020-02-13";

  src = fetchFromGitHub {
    owner = "KaylaPP";
    repo = "SoliCurses";
    rev = "dc89ca00fc1711dc449d0a594a4727af22fc35a0";
    sha256 = "sha256-zWYXpvEnViT/8gsdMU9Ymi4Hw+nwkG6FT/3h5sNMCE4=";
  };

  buildInputs = [
    ncurses
  ];

  preBuild = ''
    cd build
  '';

  makeFlags = [
    "CC=${stdenv.cc.targetPrefix}c++"
  ];

  installPhase = ''
    install -D SoliCurses.out $out/bin/solicurses
  '';

  meta = with lib; {
    description = "A version of Solitaire written in C++ using the ncurses library";
    homepage = "https://github.com/KaylaPP/SoliCurses";
    maintainers = with maintainers; [ laalsaas ];
    license = licenses.gpl3Only;
    inherit (ncurses.meta) platforms;
  };
}